 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">

<title>修改广告</title>
<link href="../Public/js/tadd.css" rel="stylesheet" type="text/css">
<link href="../Public/js/jqModal.css" rel="stylesheet" type="text/css">
<script charset="gbk" type="text/javascript" src="../Public/js/jquery-1.js"></script>
<script charset="gbk" type="text/javascript" src="../Public/js/grid.js"></script>
<script charset="gbk" src="../Public/js/area.js" type="text/javascript"></script>
<script charset="gbk" type="text/javascript" src="../Public/js/session_timeout.js"></script>


<link rel="stylesheet" type="text/css" href="../Public/jquery-easyui-1.3.4/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../Public/jquery-easyui-1.3.4/themes/icon.css">
<script type="text/javascript" src="../Public/jquery-easyui-1.3.4/jquery.min.js"></script>
<script type="text/javascript" src="../Public/jquery-easyui-1.3.4/jquery.easyui.min.js"></script>





<style>
	.bt_box { padding-top:8px;}
	#slot_url_show{ position: absolute; top:450px; left:560px; margin:0px auto;   padding:0; z-index:999;background:#fff;}
	#BOX_overlay{position: absolute;z-index: 100; top: 0px; left: 0px; background-color:#333333;filter: alpha(opacity=50);-moz-opacity: 0.7;opacity:0.7;}
	</style>

	<script>
	var slotinhelp = "<div class='statistic'><div class='contextual_help' name='mobilehelp' style=' top:6px; _top:-20px; *+top:-22px;'><a href='#' onmouseout='closeHelp(541);' onmouseover='showHelp(541);'> </a><div id='key541' style='display: none;'> <p> 网站中预览，是指在网站中真实预览广告效果。一般应用于在广告发布前，提前查看广告效果。使用此功能，需要您：</p><p>【1】页面已部署了广告位代码。</p><p>【2】预览地址，请在“广告位-修改广告位”中设置广告位“所在网页URL”一项。</p></div></div></div>";
		function selectmaterialed()
		{
			var materialid= $('#material_id').val();
			if(materialid)
				{
					var materialarr  =  materialid.split(",");
					
					for(var i=0;i<materialarr.length-1;i++)
						{
							$('#slotgridTable1').jqGrid("setSelection",materialarr[i]);
						}
					
				}
		
		}
	
function setcumptercode(){
	
		$('#checksubmitslotname1').hide();
		$('#dwselect option[value=dwoptionsystem]').after("<option value='dwRespectivelyrate'>分辨率</option>");
		$('#ex3aTriggercode').show();
		$('#select2').html("<option  value='0' id='even' onclick='gridReload1(0);'>均匀</option> <option value='3' id='order' onclick='gridReload1(3);'>顺序</option><option  value='1' id='head_weight' onclick='gridReload1(1);'>手动权重</option><option value='2' id='flash' onclick='gridReload1(2);'>幻灯片</option>");
		var c_divdwoptionsystemlist = "<ul id='optionsystemWindowsXp' name='WindowsXp'><li style=\"width:160px;\" class=\"f12_g\">WindowsXp</li><li id='lioptionsystemWindowsXp' onclick=\"adddwoptionsystem('WindowsXp','WindowsXp')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemWindowsVista' name='WindowsVista'><li style=\"width:160px;\" class=\"f12_g\">WindowsVista</li><li id='lioptionsystemWindowsVista' onclick=\"adddwoptionsystem('WindowsVista','WindowsVista')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemWindows2000' name='Windows2000'><li style=\"width:160px;\" class=\"f12_g\">Windows2000</li><li id='lioptionsystemWindows2000' onclick=\"adddwoptionsystem('Windows2000','Windows2000')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemWindows2003' name='Windows2003'><li style=\"width:160px;\" class=\"f12_g\">Windows2003</li><li id='lioptionsystemWindows2003' onclick=\"adddwoptionsystem('Windows2003','Windows2003')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemWindows7' name='Windows7'><li style=\"width:160px;\" class=\"f12_g\">Windows7</li><li id='lioptionsystemWindows7' onclick=\"adddwoptionsystem('Windows7','Windows7')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemAndroid' name='Android'><li style=\"width:160px;\" class=\"f12_g\">Android</li><li id='lioptionsystemAndroid' onclick=\"adddwoptionsystem('Android','Android')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemiOS' name='iOS'><li style=\"width:160px;\" class=\"f12_g\">iOS</li><li id='lioptionsystemiOS' onclick=\"adddwoptionsystem('iOS','iOS')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemMacintosh' name='Macintosh'><li style=\"width:160px;\" class=\"f12_g\">Macintosh</li><li id='lioptionsystemMacintosh' onclick=\"adddwoptionsystem('Macintosh','Macintosh')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemLinux' name='Linux'><li style=\"width:160px;\" class=\"f12_g\">Linux</li><li id='lioptionsystemLinux' onclick=\"adddwoptionsystem('Linux','Linux')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemqita' name='其它'><li style=\"width:160px;\" class=\"f12_g\">其它</li><li id='lioptionsystemqita'  onclick=\"adddwoptionsystem('qita','其它')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul>";
		
		
		var c_divdwAccesslist =" <ul id='accessliantong' name='联通'><li style=\"width:160px;\" class=\"f12_g\">联通</li><li id='spanaddliantong' onclick=\"adddwaccess('liantong','联通')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='accessdianxin' name='电信'><li style=\"width:160px;\" class=\"f12_g\">电信</li><li id='spanadddianxin' onclick=\"adddwaccess('dianxin','电信')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='accesswangba' name='网吧'><li style=\"width:160px;\" class=\"f12_g\">网吧</li><li id='spanaddwangba' onclick=\"adddwaccess('wangba','网吧')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='accessjiaoyu' name='教育'><li style=\"width:160px;\" class=\"f12_g\">教育</li><li id='spanaddjiaoyu' onclick=\"adddwaccess('jiaoyu','教育')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='accessqita' name='其它'><li style=\"width:160px;\" class=\"f12_g\">其它</li><li id='spanaddqita'  onclick=\"adddwaccess('qita','其它')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul>";
		
		var c_divdwbrowsertypelist ="<ul id='browsertypeInternetExplorer6' name='微软IE6'><li style=\"width:160px;\" class=\"f12_g\">微软IE6</li><li id='liaddInternetExplorer6' onclick=\"adddwbrowsertype('InternetExplorer6','微软IE6')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeInternetExplorer7' name='微软IE7'><li style=\"width:160px;\" class=\"f12_g\">微软IE7</li><li id='liaddInternetExplorer7' onclick=\"adddwbrowsertype('InternetExplorer7','微软IE7')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeInternetExplorer8' name='微软IE8'><li style=\"width:160px;\" class=\"f12_g\">微软IE8</li><li id='liaddInternetExplorer8' onclick=\"adddwbrowsertype('InternetExplorer8','微软IE8')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeInternetExplorer9' name='微软IE9'><li style=\"width:160px;\" class=\"f12_g\">微软IE9</li><li id='liaddInternetExplorer9' onclick=\"adddwbrowsertype('InternetExplorer9','微软IE9')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertype360safe' name='360安全浏览器'><li style=\"width:160px;\" class=\"f12_g\">360安全浏览器</li><li id='liadd360safe' onclick=\"adddwbrowsertype('360safe','360安全浏览器')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypesougou' name='搜狗'><li style=\"width:160px;\" class=\"f12_g\">搜狗</li><li id='liaddsougou' onclick=\"adddwbrowsertype('sougou','搜狗')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeTT' name='腾讯TT'><li style=\"width:160px;\" class=\"f12_g\">腾讯TT</li><li id='liaddTT' onclick=\"adddwbrowsertype('TT','腾讯TT')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeMaxthon' name='遨游Maxthon'><li style=\"width:160px;\" class=\"f12_g\">遨游Maxthon</li><li id='liaddMaxthon' onclick=\"adddwbrowsertype('Maxthon','遨游Maxthon')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeTheWorld' name='世界之窗TheWorld'><li style=\"width:160px;\" class=\"f12_g\">世界之窗TheWorld</li><li id='liaddTheWorld' onclick=\"adddwbrowsertype('TheWorld','世界之窗TheWorld')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeFireFox' name='火狐FireFox'><li style=\"width:160px;\" class=\"f12_g\">火狐FireFox</li><li id='liaddFireFox' onclick=\"adddwbrowsertype('FireFox','火狐FireFox')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeChrome' name='谷歌Chrome'><li style=\"width:160px;\" class=\"f12_g\">谷歌Chrome</li><li id='liaddChrome' onclick=\"adddwbrowsertype('Chrome','谷歌Chrome')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeSafari' name='苹果Safari'><li style=\"width:160px;\" class=\"f12_g\">苹果Safari</li><li id='liaddSafari' onclick=\"adddwbrowsertype('Safari','苹果Safari')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeOpera' name='Opera'><li style=\"width:160px;\" class=\"f12_g\">Opera</li><li id='liaddOpera' onclick=\"adddwbrowsertype('Opera','Opera')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul>	<ul id='browsertypeqita' name='其它'><li style=\"width:160px;\" class=\"f12_g\">其它</li><li id='liaddqita' onclick=\"adddwbrowsertype('qita','其它')\" style='color:#3377AA;cursor:pointer;text-decoration:underline;width:150px;'>添加</li></ul>";
	
		closedeliverydiv('browsertype');
		closedeliverydiv('Access');
		closedeliverydiv('optionsystem');	
		$('#divdwoptionsystemlist').html(c_divdwoptionsystemlist);
		$('#divdwAccesslist').html(c_divdwAccesslist);
		$('#divdwbrowsertypelist').html(c_divdwbrowsertypelist);		
	
	}
	
	function setmobilecode(){
		$('#dwselect option[value=dwRespectivelyrate]').remove();
		closedeliverydiv('Respectivelyrate');
		$('#dwselect option[value=dwterritory]').attr('selected',true);
		
		$('#dwselect').change();

		$('#checksubmitslotname1').show();
		$('#ex3aTriggercode').hide();
		$('#checksubmitslotname1').html("温馨提醒：该广告位为移动端广告位");
		$('#select2').html("<option  value='0' id='even' onclick='gridReload1(0);'>均匀</option> <option value='3' id='order' onclick='gridReload1(3);'>顺序</option><option  value='1' id='head_weight' onclick='gridReload1(1);'>手动权重</option>");
		//gridReload1(0);
		var m_divdwoptionsystemlist = "<ul id='optionsystemAndroid' name='Android'><li style=\"width:160px;\" class=\"f12_g\">Android</li><li id='lioptionsystemAndroid' onclick=\"adddwoptionsystem('Android','Android')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemiOS' name='iOS'><li style=\"width:160px;\" class=\"f12_g\">iOS</li><li id='lioptionsystemiOS' onclick=\"adddwoptionsystem('iOS','iOS')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemWindowsPhone' name='WindowsPhone'><li style=\"width:160px;\" class=\"f12_g\">WindowsPhone</li><li id='lioptionsystemWindowsPhone' onclick=\"adddwoptionsystem('WindowsPhone','WindowsPhone')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='optionsystemqita' name='其它'><li style=\"width:160px;\" class=\"f12_g\">其它</li><li id='lioptionsystemqita'  onclick=\"adddwoptionsystem('qita','其它')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul>";
		
		
		var m_divdwAccesslist ="<ul id='accessyidong' name='移动'><li style=\"width:160px;\" class=\"f12_g\">移动</li><li id='spanaddyidong' onclick=\"adddwaccess('yidong','移动')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul> <ul id='accessliantong' name='联通'><li style=\"width:160px;\" class=\"f12_g\">联通</li><li id='spanaddliantong' onclick=\"adddwaccess('liantong','联通')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='accessdianxin' name='电信'><li style=\"width:160px;\" class=\"f12_g\">电信</li><li id='spanadddianxin' onclick=\"adddwaccess('dianxin','电信')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='accessqita' name='其它'><li style=\"width:160px;\" class=\"f12_g\">其它</li><li id='spanaddqita'  onclick=\"adddwaccess('qita','其它')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul>";
		
		var m_divdwbrowsertypelist ="<ul id='browsertypeuc' name='uc浏览器'><li style=\"width:160px;\" class=\"f12_g\">uc浏览器</li><li id='liadduc' onclick=\"adddwbrowsertype('uc','uc浏览器')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeqq' name='QQ浏览器'><li style=\"width:160px;\" class=\"f12_g\">QQ浏览器</li><li id='liaddqq' onclick=\"adddwbrowsertype('qq','QQ浏览器')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul><ul id='browsertypeOpera' name='Opera'><li style=\"width:160px;\" class=\"f12_g\">Opera</li><li id='liaddOpera' onclick=\"adddwbrowsertype('Opera','Opera')\" style=\"color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;\">添加</li></ul>	<ul id='browsertypeqita' name='其它'><li style=\"width:160px;\" class=\"f12_g\">其它</li><li id='liaddqita' onclick=\"adddwbrowsertype('qita','其它')\" style='color:#3377AA;cursor:pointer;text-decoration:underline;width:150px;'>添加</li></ul>";
	
		closedeliverydiv('browsertype');
		closedeliverydiv('Access');
		closedeliverydiv('optionsystem');	
		
		$('#divdwoptionsystemlist').html(m_divdwoptionsystemlist);
		$('#divdwAccesslist').html(m_divdwAccesslist);
		$('#divdwbrowsertypelist').html(m_divdwbrowsertypelist);
		
		
		
	}
	
	function deletename(id){var del_material=confirm('确认删除这个物料？');if(del_material){var num=$("#list  tr").length-1;var select2=$('#select2').val();if(num==3&&select2==1){$('#num_0').hide();$('.tr_xl_tit').children(":eq(3)").hide();$('.tr_white_tit').each(function(){$(this).children(":eq(3)").hide();});$('#select2').val('0');$('#material_change').val('0');$('#str1').val('');}
if(num==3){gridReload1(0);$('#select2').val('0');}
if(num<12){$("#relation").hide();}
if(num==2){$('#num_0').show();}
if(num>2){$('#lunhuan').show();}
if(num<4){$('#lunhuan').show();$('#show_falsh').hide();$('#flash_code_num').hide();$('#material_change').val('0');}else{$('#show_falsh').show();}
var id1=id+',';var m_id=$("#material_id").val();var zhi=m_id.replace(id1,'');$('#select'+id).remove();$('#weight'+id).remove();$("#material_id").val(zhi);var material_change=$("#select2").val();if(material_change==2){if($('#list .flash_i').size()!='0'||$('#list .code_i').size()!='0'){$('#flash_code_num').show();}else{$('#flash_code_num').hide();}}setmolist();}else{return false;}}
	function setiframecolse()
	{
		$('.jqmClose').click();
		$('#ex3a').hide();
	}
	function by_value(id){};
	function setiframeauto(height)
	{
		
		$('#ceratematerialmain').height(height+50);
		$('#modifyiframe').height(height+50);
		$('#ex3a').height(height+50);
		$('#ex3a_modify').height(height+50);
	}
	
function getmaterialdata(type)
	{
	
		
		

		
		//alaert(str);
$('.jqmClose').click();
var str = type.split('{#}');
  if(str[3]==1)
					var name='焦点图';
				 if(str[3]==2)
					var name='焦点图';
				 if(str[3]==3)
					var name='泰山压顶';
				 if(str[3]==4)
					var name='弹网址';
				 if(str[3]==5)
					var name='焦点图';
				 if(str[3]==6)
					var name='对联';
				if(str[3]==7)
					var name='屏中路障';
				if(str[3]==8)
					var name='焦点图';
				if(str[3]==9)
					var name='图文';
				if(str[3]==10)
					var name='对联（可重播）';
				if(str[3]==11)
					var name='浮窗：外嵌按钮(一)';
				if(str[3]==12)
					var name='浮窗：外嵌按钮(二)';
				if(str[3]==13)
					var name='浮窗：内嵌按钮(一)';
				if(str[3]==14)
					var name='浮窗：内嵌按钮(二)';
				if(str[3]==15)
					var name='浮窗：带标题栏';
				  
if(str[2]==1)
	{
		var typestr	=	"<div class='font_i'>文字</div>";
	}
else if(str[2]==2)
	{
		var typestr	=	"<div class='pic_i'>图片</div>";
	}
else if(str[2]==3)
	{
		var typestr	=	"<div class='flash_i'>FLASH</div>";
	}	
else if(str[2]==4)
	{
		var typestr	="<div class='code_i'>富媒体</div>";
	}
else
	{
		var typestr	="<div class='code_i' >"+name+"</div>";
	}
var s_id = jQuery.trim(str[0]);
var id1 = s_id + ',';
var m_id = $("#material_id").val();
var zhi = m_id + id1;
var str1 = m_id.split(',');
if (str1.length < 11) {
    $("#material_id").val(zhi);
}
var num = $("#list  tr").length - 2;
if (num >= 0) {
    $('#unerror').hide();
}
if (num > 0) {
    $('#lunhuan').show();
}
if (num == 0) {
    $('#num_0').hide();
}
if (num > 9) {
    $("#relation").show();
    return false;
} else {
    var select2 = $("#select2").val();
    if (select2 == 1) {
        $('#list').append("<tr class='tr_white_tit' id='select" + s_id + "' name=" + str[0] + " value=" + str[0] + "><td align='center'>&nbsp;</td><td  id='select1" + s_id + "'>" + str[1] + "</td><td  id='select2" + s_id + "'>"+typestr+"</td><td><div style='z-index:1000;'><select name='select3' id=select3" + s_id + "  class='select_1' style='width:60px;'><option value='1'>1</option><option  value='2'>2</option><option  value='3'>3</option><option  value='4'>4</option><option selected   value='5'>5</option><option   value='6'> 6</option><option   value='7'>7</option><option   value='8'>8</option><option   value='9'>9</option><option   value='10'>10</option></select></div></td><td class='blue'><a href='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id=" + s_id + "'  name='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id=" + s_id + "' target='_blank' onclick='sendlogtoserver(139,2,-1,89476)'>预览</a><a href='javascript:' onclick='sendlogtoserver(140,2,-1,89476),ex3a_modify_remove(" + s_id + "); by_value(" + s_id + ");' id=ex3a_modifyTrigger_" + s_id + ">修改</a><a href='javascript:' onclick='sendlogtoserver(141,2,-1,89476),deletename(" + s_id + ")'>删除</a><a href='javascript:' onclick='sendlogtoserver(142,2,-1,89476),visual_preview(" + s_id + ")'>网站中预览</a>"+slotinhelp+"</td></tr>");
        ex3a_modify_bind(s_id);
    } else {
        $('#list').append("<tr class='tr_white_tit' id='select" + s_id + "' name=" + str[0] + " value=" + str[0] + "><td align='center'>&nbsp;</td><td  id='select1" + s_id + "'>" + str[1] + "</td><td  id='select2" + s_id + "'>"+typestr+"</td><td style='display:none;'><div style='z-index:1000;'><select name='select3' id=select3" + s_id + "  class='select_1' style='width:60px;'><option value='1'>1</option><option  value='2'>2</option><option  value='3'>3</option><option  value='4'>4</option><option selected   value='5'>5</option><option   value='6'> 6</option><option   value='7'>7</option><option   value='8'>8</option><option   value='9'>9</option><option   value='10'>10</option></select></div></td><td class='blue'><a href='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id=" + s_id + "'  name='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id=" + s_id + "' target='_blank' onclick='sendlogtoserver(139,2,-1,89476)'>预览</a><a href='javascript:' onclick='sendlogtoserver(139,2,-1,89476),ex3a_modify_remove(" + s_id + "); by_value(" + s_id + ");' id=ex3a_modifyTrigger_" + s_id + ">修改</a><a href='javascript:' onclick='sendlogtoserver(141,2,-1,89476),deletename(" + s_id + ")'>删除</a><a href='javascript:' onclick='sendlogtoserver(142,2,-1,89476),visual_preview(" + s_id + ")'>网站中预览</a>"+slotinhelp+"</td></tr>");
        ex3a_modify_bind(s_id);
        var m_slot_size = $('#m_slot_size').val();
        if (m_slot_size != '') {
            setslotsize();
        }
    }
}
	$('#creatematerialiftame').html('');
	$('#ex3a_modify').hide();
	$('.inner').css("position",'relative');
	setmolist();
	}
	
	
	function mgetmaterialdata(type)
	
		{
		
			$('.jqmClose').click();
				  var str = type.split('{#}');
				    if(str[3]==1)
					var name='焦点图';
				 if(str[3]==2)
					var name='焦点图';
				 if(str[3]==3)
					var name='泰山压顶';
				 if(str[3]==4)
					var name='弹网址';
				 if(str[3]==5)
					var name='焦点图';
				 if(str[3]==6)
					var name='对联';
				if(str[3]==7)
					var name='屏中路障';
				if(str[3]==8)
					var name='焦点图';
				if(str[3]==9)
					var name='图文';
				if(str[3]==10)
					var name='对联（可重播）';
				if(str[3]==11)
					var name='浮窗：外嵌按钮(一)';
				if(str[3]==12)
					var name='浮窗：外嵌按钮(二)';
				if(str[3]==13)
					var name='浮窗：内嵌按钮(一)';
				if(str[3]==14)
					var name='浮窗：内嵌按钮(二)';
				if(str[3]==15)
					var name='浮窗：带标题栏';
	
                 $("#select1" + str[0]).html(str[1]);
                                if (str[2] == 1) {
                                    $("#select2" + str[0]).html("<div class='font_i'>文字</div>");
                                }
                                if (str[2] == 2) {
                                    $("#select2" + str[0]).html("<div class='pic_i'>图片</div>");
                                }
                                if (str[2] == 3) {
                                    $("#select2" + str[0]).html("<div class='flash_i'>FLASH</div>");
                                }
                                 if (str[2] == 4) {
                                    $("#select2" + str[0]).html("<div class='code_i'>富媒体</div>");
                                }if (str[2] == 5) {
														$("#select2" + str[0]).html("<div class='code_i' >"+name+"</div>");
													}
          
                    $('#ex3a_modify').hide();
					$('#ex3a').hide();
                    $('.whiteOverlay').hide();
					$('#modifymaterialiftame').html('');
					$('.inner').css("position",'relative');
					setmolist();
                 
		}
function settodayback(id)
		{
			var nowtoday = new Date();
			var nowtadaystring = numchangedate(nowtoday);
			var ecT = new calendar();
			ecT.properties.isMultipleSelect = false;
			ecT.properties.callback = function(cal)
				{
					for (var i in cal.cache.selectedDates)
					 {
						if (cal.cache.selectedDates[i] == true)
						 {
							var selectedDate = ecT.stringToDate(i);
							getdate = selectedDate.getDate();
							if (selectedDate.getDate() < 10)
							 {
								getdate = '0' + selectedDate.getDate();
							}
							getmonth = parseInt(selectedDate.getMonth() + 1);
							if (getmonth < 10)
							 {
								getmonth = '0' + parseInt(selectedDate.getMonth() + 1);
							}
						}
					}
				if(id=='calendarT')
				{
					jQuery('#starttimedate').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);
					$('input[name=autodays]:checked').attr('checked',false);
					jQuery('#calendarT').hide();
					$('#endtimeclock').show();
					$('#starttimeclock').show();
					$('#price_mode').show();
				}
				if(id=='calendarTend')
				{
					jQuery('#endtimedate').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);
					$('input[name=autodays]:checked').attr('checked',false);
					jQuery('#calendarTend').hide();
					$('#price_mode').show();
				}
				if(id=='ordercalendarT')
				{
					jQuery('#order_starttime').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);
					jQuery('#ordercalendarT').hide();
				}
				if(id=="ordercalendarTend")
					{
						jQuery('#order_endtime').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);
						jQuery('#ordercalendarTend').hide();
					}
				
				};
			var timearray = nowtadaystring.split('-');
			if (timearray[1] == '09')
				{
					selectmonthfirst = 9;
				}
			else if (timearray[1] == '08')
				{
					selectmonthfirst = 8;
				}
			else
				{
					selectmonthfirst = parseInt(timearray[1]);
				}
			if (timearray[2] == '09')
				{
					selectdayfirst = 9;
				}
			else if (timearray[2] == '08')
				{
					selectdayfirst = 8;
				}
			 else
				{
					selectdayfirst = parseInt(timearray[2]);
				}
			ecT.init(timearray[0], selectmonthfirst - 1, id, selectdayfirst);
		}
function setmolist()
	{
		$('td[name=molist]').remove();
		var num	=	$("#list tr").length;
		var type=	$('#select2').val();
		if(num>3&&type!=1&&type!=0)
		{
			$('#listpreshow').attr('width','37%');
			$("#list tr:eq(0)").append("<td name='molist' style='display:none' width='30%'>展现顺序<div class='statistic'><div style='right: 35px; top:7px; *right:35px;_right:35px;*top:-18px; _top:-24px;' class='contextual_help'><a onmouseover='showHelp(101);' onmouseout='closeHelp(101);' href='#'> </a><div style='display: none;right:20px' id='key101' style='right:140px'> <p>展现顺序是指当广告包含多个物料，广告首先出</p><p>现时，该物料的出现次序，排在前面的物料先展现</p></div></div></div></td>");
			var i=1;
			var str="";
			$("#list tr:nth-child(n+3)").each(function(){
			$(this).append("<td name='molist'>"+i+"<img src='images/arrow.gif' title='向上'  style='margin-left:15px;cursor:pointer' onclick='setmolistorder("+i+")'></td>");
			str+=$(this).attr('name')+',';
			i++;
			});
			$('#material_id').val(str);
		}
		else
		{
			$('#listpreshow').attr('width','67%');
		}


if(type==0)
		$('div[name=mobilehelp]').css('right',757-$('#list tr[class=tr_white_tit]').find('td[class=blue]').position().left);
		if(type==3)
		$('div[name=mobilehelp]').css('right',757-$('#list tr[class=tr_white_tit]').find('td[class=blue]').position().left-80);
		if(type==1)
		$('div[name=mobilehelp]').css('right',757-$('#list tr[class=tr_white_tit]').find('td[class=blue]').position().left-80);
		if(type==2)
		$('div[name=mobilehelp]').css('right',757-$('#list tr[class=tr_white_tit]').find('td[class=blue]').position().left-80);
	}
function setmolistorder(i)
	{
		if(i==1)
			{
				return false;
			}
		else
			{
				var self		=		$("#list tr:nth-child("+(i+2)+")").attr('name');
				var bro			=		$("#list tr:nth-child("+(i+1)+")").attr('name');
				var x			=		$('#select'+self).clone();
				$('#select'+self).remove();
				$('#select'+bro).before(x);
				setmolist();
			}		
        }
    function settotaldays()
    {
        var endday      =       $('#endtimedate').val();
        var startday    =       $('#starttimedate').val();
        var days        =       DateDiff1(endday,startday);
        $("#settotaldays").html(days+"天");
    }
    function DateDiff1(sDate1,sDate2){var aDate,oDate1,oDate2,iDays;aDate=sDate1.split("-");oDate1=new Date(aDate[0],aDate[1]-1,aDate[2]);aDate=sDate2.split("-");oDate2=new Date(aDate[0],aDate[1]-1,aDate[2]);iDays=parseInt(Math.abs(oDate1-oDate2)/1000/60/60/24);return iDays+1;}
temtableshowstate=false;mtemtableshowstate=false;


function setpage(page)
{$('#page').val(page);getdata();}





function msettemtype(type)
{$('#mtemtype').val(type);mgetdata();}
function msetpage(page)
{$('#mpage').val(page);mgetdata();}


$(document).ready(function()
{
	var type=	$('#select2').val();
	if(type=1)
	$('div[name=mobilehelp]').css('right',757-$('#list tr[class=tr_white_tit]').find('td[class=blue]').position().left);

	if(1 == 2){
		setmobilecode();
	}

	$('#channelid').change(function(){
	
		slot_rejqgrid();
	
	})
  $("#jumptodatepick").click(function(){
		$('#delivery_put_all').show();
		$('#dwselect option[value=dwdate]').attr('selected',true);
		$('#divdwdate').show();
		$('#divdwdate').siblings().hide();
		$('#dwdengyu').show();
		$('#dwdengyu').val($('#'+$('#dwselect').val().replace('dw','')+'yesorno').val());
		
        $("html,body").animate({scrollTop: 650}, 700);
        return false;
    });


$('#selecttotalpage').change(function()
{$('#page').val($('#selecttotalpage').val());getdata();});$('#selectprepage').change(function()
{getdata();});$('#mchosetemplete').click(function(){if(!$('#mtemid').val())
{if($("#type25").is(":hidden"))
{$('#type25').show();$('#type21').hide();$('#type22').hide();$('#type23').hide();$('#type24').hide();$('#type26').hide();}
else
{$('#type25').hide();$('#type21').hide();$('#type22').hide();$('#type23').hide();$('#type24').show();$('#type26').hide();}
if(!mtemtableshowstate)
{mgetdata();}}
else
{if($("#type25").is(":hidden"))
{$('#type25').show();$('#type21').hide();$('#type22').hide();$('#type23').hide();$('#type24').hide();$('#type26').hide();}
else
{$('#type25').hide();$('#type21').hide();$('#type22').hide();$('#type23').hide();$('#type24').hide();$('#type26').show();}
if(!mtemtableshowstate)
{mgetdata();}}});$('#mselecttotalpage').change(function()
{$('#mpage').val($('#mselecttotalpage').val());mgetdata();});$('#mselectprepage').change(function()
{mgetdata();});$('input[name=autodays]').click(function(){var type=$(this).val();if(type=='week')
{var days=6;}
if(type=='month')
{var days=29;}
if(type=='3months')
{var days=90;}
if(type=='years')
{var days=365;}
var starttimedate=$('#starttimedate').val();var startarray=starttimedate.split('-');var today=new Date(""+startarray[0]+"/"+startarray[1]+"/"+startarray[2]);var oMyDate=addDate(today,days);var todaystring=numchangedate(oMyDate);$('#endtimedate').val(todaystring);$('#checksubmittimeclock').hide();settotaldays();})})
function disDate(oDate,iDate){var ms=oDate.getTime();ms-=iDate*24*60*60*1000;return new Date(ms);}
function addDate(oDate,iDate){var ms=oDate.getTime();ms+=iDate*24*60*60*1000;return new Date(ms);}
function numchangedate(d)
{var vYear=d.getFullYear();var vMon=d.getMonth()+1;var vDay=d.getDate();vMon=vMon<10?"0"+vMon:vMon;vDay=vDay<10?"0"+vDay:vDay
var ordertoday=vYear+'-'+vMon+'-'+vDay;return ordertoday;}
function visual_preview(id){$('#slot_url_error').hide();var slotname=$("#slotnamevalue").val();var m_id=id;$("#visual_preview_id").val(m_id);if(slotname==''){alert("请选择目标广告位");}else{$.ajax({type:'POST',url:'?mo=delivery&fo=delivery_slot_url&ro=s&sid=61037&pid=89476',async:false,data:'slotid='+slotname+'&adm_cnzz_token=79023d0e8772c1a7cd9b7926d5133bed&date='+new Date(),success:function(msg){if(msg.indexOf('guanli_session_timeout_list')!=-1){window.location.href='?mo=login&fo=login_timeout';}else if(msg.indexOf('nocooikelimit')!=-1){window.location.href='?mo=login&fo=login_no_limit';}else{if(msg==0){BOX_show('slot_url_show');}else{var str=msg.split(',');if(str[1].indexOf('?')>-1){window.open(""+str[1]+"&visual_preview_m_id="+m_id+"&visual_preview_slot_id="+slotname+"");}else{window.open(""+str[1]+"?visual_preview_m_id="+m_id+"&visual_preview_slot_id="+slotname+"");}}}}})}}
function slot_url_add(){var slot_url=$("#slot_url").val();var slotname=$("#slotnamevalue").val();var m_id=$('#visual_preview_id').val();var te=/^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)([\w-]+\.)+(\S)+$/i;if(slot_url==''){$('#slot_url_error').show();$('#slot_url_error').html("URL 不能为空");return false;}else{if(!te.test(slot_url)){$('#slot_url_error').show();$('#slot_url_error').html("URL 格式有误");return false;}else{$('#slot_url_error').hide();$.ajax({type:'POST',url:'?mo=delivery&fo=delivery_slot_url_add&ro=s&sid=61037&pid=89476',async:false,data:'slotid='+slotname+'&slot_url='+slot_url+'&adm_cnzz_token=79023d0e8772c1a7cd9b7926d5133bed&date='+new Date(),success:function(msg){if(msg.indexOf('guanli_session_timeout_list')!=-1){window.location.href='?mo=login&fo=login_timeout';}else if(msg.indexOf('nocooikelimit')!=-1){window.location.href='?mo=login&fo=login_no_limit';}else{if(msg!=1){BOX_show('slot_url_show');}else{BOX_remove('slot_url_show');if(slot_url.indexOf('?')>-1){window.open(""+slot_url+"&visual_preview_m_id="+m_id+"&visual_preview_slot_id="+slotname+"");}else{window.open(""+slot_url+"?visual_preview_m_id="+m_id+"&visual_preview_slot_id="+slotname+"");}}}}})}}}

function DrawImg(boxWidth,boxHeight,imgWidth,imgHeight){if(imgWidth>=640||imgHeight>=600){　　　
　　　 if((boxWidth/boxHeight)>=(imgWidth/imgHeight)){　　　　　　　
　　　　　　　 var img_width=(boxHeight*imgWidth)/imgHeight;　　　　　　　 var img_height=boxHeight;var wid_hei=img_width+','+img_height;return wid_hei;　　　}else{　　　　　　　
　　　　　　　 var img_width=boxWidth;　　　　　　　 var img_height=(boxWidth*imgHeight)/imgWidth;var wid_hei=img_width+','+img_height;return wid_hei;　　　}}else{var wid_hei=imgWidth+','+imgHeight;return wid_hei;}}
function setslotsize(){var m_slot_size=$('#m_slot_size').val();$('#list a').each(function(){if($(this).attr('href')!='javascript:'){var slot_size=$(this).attr('href');var str="slotsize";if(slot_size.match(str)){var slot_size_name=$(this).attr('name');var slot_size_all_name=slot_size_name+"&slotsize="+m_slot_size;$(this).attr('href',slot_size_all_name);}else{var slot_size_all=slot_size+"&slotsize="+m_slot_size;}
$(this).attr('href',slot_size_all);}})}
function delslotsize(){$('#list a').each(function(){if($(this).attr('href')!='javascript:'){var slot_size_name=$(this).attr('name');$(this).attr('href',slot_size_name);}})}

var slottableshowstate=false;
var ordershowstate=false;
var materialshowstate=false;

function ex3a_modify_remove(id) {
    var select_aaaa = '#ex3a_modifyTrigger_' + id;
    $('#ex3a_modify').jqm({
        trigger: select_aaaa,
        overlay: 30,
        modal: true,
        overlayClass: 'whiteOverlay'
    }).jqmAddClose(".jqmClose");
    $("a[id^='ex3a_modifyTrigger']").each(function() {
        $('#ex3a_modify').jqmAddTrigger(this);
    });
    $('.whiteOverlay').show();
    $("#ex3a_modify").show();
	var slotpath = $('#slotcodeinwhere').val();	
	$('#modifymaterialiftame').html("<iframe id='modifyiframe' src='?mo=material&fo=material_modify&slotpath="+slotpath+"&id="+id+"&ro=s&sid=61037&pid=89476&formdelivery=yes'frameborder='0' scrolling='no'  width=810 ></iframe>");
	$("#modifyiframe").load(function(){
		var mainheight = $(this).contents().find("body").height()+44;
		$(this).height(mainheight);
		$('#ex3a_modify').height(mainheight);
		}); 
	
}

var json=eval(jsonarea.options);$(document).ready(function()
{$(".more_input input").each(function(){$(this).attr('checked',false);});jQuery("#directclick").click(function()
{if($('#domaintextarea').val()=='')
{$('#domaintextarea').val('(direct)');}
else
{if($('#domaintextarea').val().indexOf('(direct)')!=-1||$('#domaintextarea').val().indexOf('（direct）')!=-1)
return false;else
$('#domaintextarea').val($('#domaintextarea').val()+'\n(direct)');}});jQuery.fn.center=function()
{this.css("position","absolute");this.css("top",(($(window).height()-this.height())/2+$(window).scrollTop())+"px");this.css("left",(($(window).width()-this.width())/2+$(window).scrollLeft())+"px");return this;}
jQuery("#company_search_cd").keydown(function(e)
{if(e.keyCode==13)
{getcompanyload();}});$('#company_search_cd').focus(function()
{var txt_value=$(this).val();if(txt_value==this.defaultValue)
{$(this).val("");$(this).attr('class',"ss_inp1");}});$('#company_search_cd').blur(function()
{var txt_value=$(this).val();if(txt_value=="")
{$(this).attr('class',"ss_inp");$(this).val(this.defaultValue);}});if($("#company_search_cd").val()=='输入广告主名称关键字')
{$('#company_search_cd').attr('class',"ss_inp");}
jQuery("#daili_search_cd").keydown(function(e)
{if(e.keyCode==13)
{getdailiload();}});$('#daili_search_cd').focus(function()
{var txt_value=$(this).val();if(txt_value==this.defaultValue)
{$(this).val("");$(this).attr('class',"ss_inp1");}});$('#daili_search_cd').blur(function()
{var txt_value=$(this).val();if(txt_value=="")
{$(this).attr('class',"ss_inp");$(this).val(this.defaultValue);}});if($("#daili_search_cd").val()=='输入代理商名称关键字')
{$('#daili_search_cd').attr('class',"ss_inp");}
jQuery("#linkman_search_cd").keydown(function(e)
{if(e.keyCode==13)
{getlinkmanload()}});$('#linkman_search_cd').focus(function()
{var txt_value=$(this).val();if(txt_value==this.defaultValue)
{$(this).val("");$(this).attr('class',"ss_inp1");}});$('#linkman_search_cd').blur(function()
{var txt_value=$(this).val();if(txt_value=="")
{$(this).attr('class',"ss_inp");$(this).val(this.defaultValue);}});if($("#linkman_search_cd").val()=='输入联系人名称关键字')
{$('#linkman_search_cd').attr('class',"ss_inp");}
jQuery("#daililinkman_search_cd").keydown(function(e)
{if(e.keyCode==13)
{getdaililinkmanload();}});$('#daililinkman_search_cd').focus(function()
{var txt_value=$(this).val();if(txt_value==this.defaultValue)
{$(this).val("");$(this).attr('class',"ss_inp1");}});$('#daililinkman_search_cd').blur(function()
{var txt_value=$(this).val();if(txt_value=="")
{$(this).attr('class',"ss_inp");$(this).val(this.defaultValue);}});if($("#daililinkman_search_cd").val()=='输入联系人名称关键字')
{$('#daililinkman_search_cd').attr('class',"ss_inp");}
jQuery("#search_cd").keydown(function(e)
{if(e.keyCode==13)
{gridReload();}});jQuery("#slot_search").keydown(function(e)
{if(e.keyCode==13)
{slot_rejqgrid();}});$('#slot_search').focus(function()
{var txt_value=$(this).val();if(txt_value==this.defaultValue){$(this).val("");$(this).attr('class',"ss_inp1");}});$('#slot_search').blur(function()
{var txt_value=$(this).val();if(txt_value==""){$(this).attr('class',"ss_inp");$(this).val(this.defaultValue);}});if($("#slot_search").val()=='输入广告位名称关键字'){$('#slot_search').attr('class',"ss_inp");}
jQuery("#order_search").keydown(function(e)
{if(e.keyCode==13)
{orderregrid();}});$('#order_search').focus(function()
{var txt_value=$(this).val();if(txt_value==this.defaultValue){$(this).val("");$(this).attr('class',"ss_inp1");}});$('#order_search').blur(function()
{var txt_value=$(this).val();if(txt_value==""){$(this).attr('class',"ss_inp");$(this).val(this.defaultValue);}});if($("#order_search").val()=='输入订单名称关键字'){$('#order_search').attr('class',"ss_inp");}

$('#charge_mode').click(function(){
if($('#charge_mode').val()=='cpm')
	{
		$('#everydaylimitspan').html("每天展现：");
		$('#hourmaxlimit_div').show();
	}
else
	{
		$('#everydaylimitspan').html("每天点击：");
		$('#hourmaxlimit_div').hide();
	}


})



$("#price_mode").change(function()
{var charge_mode=$('#price_mode').val();if(charge_mode=='cpd')
{$('#charge_mode_list').html('元/天');$('#delivery_price').val('0');$('#cpahide').show();}
if(charge_mode=='cpt')
{$('#charge_mode_list').html('元/小时');$('#delivery_price').val('0');$('#cpahide').show();}
if(charge_mode=='cpm')
{$('#charge_mode_list').html('元/千次展现');$('#delivery_price').val('0');$('#cpahide').show();$('#hourmaxlimit_div').show();}
if(charge_mode=='cpc')
{$('#charge_mode_list').html('元/每次点击');$('#delivery_price').val('0');$('#cpahide').show();$('#hourmaxlimit_div').hide();}
if(charge_mode=='cpa')
{$('#charge_mode_list').html('');$('#delivery_price').val('0');$('#cpahide').hide();$}});$("#delivery_changenum").click(function()
{$('#delivery_bignum').hide();$('#delivery_smailnum').show();});$("#delivery_nonum").click(function()
{$('#delivery_bignum').show();$('#delivery_smailnum').hide();$('#delivery_num').val('');$('#checkdaymax').hide();$('#checkdaymax').html('');});$("#timeset").click(function()
{$('#endtimeset').show();$('#notimelimit').hide();$("#endtimeclock option[value=24]").attr('selected',true);var starttime=$('#starttimedate').val();var startarray=starttime.split('-');var starttoday=new Date(""+startarray[0]+"/"+startarray[1]+"/"+startarray[2]);var startoMyDate=addDate(starttoday,1);var startoMyDatestring=numchangedate(startoMyDate);$('#endtimedate').val(startoMyDatestring); settotaldays();});$("#notimeset").click(function()
{$('#endtimeset').hide();$('#notimelimit').show();$('#endtimedate').val('');$('#endtimeclock option[value=0]').attr('selected',true);$('input[name=autodays]:checked').attr('checked',false);});$("#selectone").blur(function()
{$('#selecttwo option[value='+$('#selectone').val()+']').attr("disabled",true);$('#selectthree option[value='+$('#selectone').val()+']').attr("disabled",true);});jQuery("#calendarT").click(function(e)
{
e.stopPropagation();
});
jQuery("#calendarTend").click(function(e)
{e.stopPropagation();
settotaldays();});$(document).click(function(){$('#calendarT').hide();$('#calendarTend').hide();$('#price_mode').show();$('#endtimeclock').show();$('#starttimeclock').show();});jQuery("#starttimedate").click(function(e)
{if($("#calendarT").is(":hidden"))
{e.stopPropagation();}
jQuery('#calendarT').show();$('#endtimeclock').hide();$('#starttimeclock').hide();$('#price_mode').hide();jQuery('#calendarTend').hide();$('#checksubmittimeclock').hide();var ecT=new calendar();ecT.properties.isMultipleSelect=false;ecT.properties.callback=function(cal)
{for(var i in cal.cache.selectedDates)
{if(cal.cache.selectedDates[i]==true)
{var selectedDate=ecT.stringToDate(i);getdate=selectedDate.getDate();if(selectedDate.getDate()<10)
{getdate='0'+selectedDate.getDate();}
getmonth=parseInt(selectedDate.getMonth()+1);if(getmonth<10)
{getmonth='0'+parseInt(selectedDate.getMonth()+1);}}}
jQuery('#starttimedate').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);$('input[name=autodays]:checked').attr('checked',false);jQuery('#calendarT').hide();$('#endtimeclock').show();$('#starttimeclock').show();};var timearray=jQuery('#starttimedate').val().split('-');if(timearray[1]=='09')
{selectmonthfirst=9;}
else if(timearray[1]=='08')
{selectmonthfirst=8;}
else
{selectmonthfirst=parseInt(timearray[1]);}
if(timearray[2]=='09')
{selectdayfirst=9;}
else if(timearray[2]=='08')
{selectdayfirst=8;}
else
{selectdayfirst=parseInt(timearray[2]);}
ecT.init(timearray[0],selectmonthfirst-1,'calendarT',selectdayfirst);});jQuery("#endtimedate").click(function(e)
{if($("#calendarTend").is(":hidden"))
{e.stopPropagation();}
jQuery('#calendarT').hide();jQuery('#calendarTend').show();$('#price_mode').hide();$('#checksubmittimeclock').hide();var ecT=new calendar();ecT.properties.isMultipleSelect=false;ecT.properties.callback=function(cal)
{for(var i in cal.cache.selectedDates)
{if(cal.cache.selectedDates[i]==true)
{var selectedDate=ecT.stringToDate(i);getdate=selectedDate.getDate();if(selectedDate.getDate()<10)
{getdate='0'+selectedDate.getDate();}
getmonth=parseInt(selectedDate.getMonth()+1);if(getmonth<10)
{getmonth='0'+parseInt(selectedDate.getMonth()+1);}}}
jQuery('#endtimedate').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);$('input[name=autodays]:checked').attr('checked',false);jQuery('#calendarTend').hide();$('#price_mode').show();};var timearray=jQuery('#endtimedate').val().split('-');if(timearray[1]=='09')
{selectmonthfirst=9;}
else if(timearray[1]=='08')
{selectmonthfirst=8;}
else
{selectmonthfirst=parseInt(timearray[1]);}
if(timearray[2]=='09')
{selectdayfirst=9;}
else if(timearray[2]=='08')
{selectdayfirst=8;}
else
{selectdayfirst=parseInt(timearray[2]);}
ecT.init(timearray[0],selectmonthfirst-1,'calendarTend',selectdayfirst);settotaldays();});$('#dwselect').change(function()
{$('#flowDiv').hide();$('#div'+$('#dwselect').val()).show();$('#div'+$('#dwselect').val()).siblings().hide();if($('#dwselect').val()=='dwterritory'||$('#dwselect').val()=='dwAccess'||$('#dwselect').val()=='dwbrowsertype'||$('#dwselect').val()=='dwbrowserlanguage'||$('#dwselect').val()=='dwoptionsystem'||$('#dwselect').val()=='dwRespectivelyrate'||$('#dwselect').val()=='dwdate'||$('#dwselect').val()=='dwdomain')
{
	$('#dwdengyu option[value=1]').html('等于');
	$('#dwdengyu option[value=0]').html('不等于');
$('#dwdengyu').show();$('#dwdengyu').val($('#'+$('#dwselect').val().replace('dw','')+'yesorno').val());}

else if($('#dwselect').val()=='dwaccessurl')
	{
		$('#dwdengyu option[value=1]').html('包含');
		$('#dwdengyu option[value=0]').html('不包含');
	$('#dwdengyu').show();$('#dwdengyu').val($('#'+$('#dwselect').val().replace('dw','')+'yesorno').val());
	}
else
{$('#dwdengyu').hide();}})
$("#checkalldate").click(function()
{$("input[name='rights[]']").attr("checked",'ture');$('.more_input li').addClass('curr_input');$('.day_7 input').attr('checked',true);$('#totalday').html($("input[name='rights[]']:checked").size());})
$("#checkworkdate").click(function()
{var objname=new Array('Monday','Tuesday','Wednesday','Thursday','Friday');$("input[name='rights[]']:checked").removeAttr("checked");$('.more_input li').removeClass('curr_input');$('.day_7 input').attr('checked',false);for(var i=0;i<objname.length;i++)
{var start=0;$(".more_input input").each(function()
{if($(this).attr('type')=="checkbox"&&$(this).attr('id').indexOf(objname[i])!=-1)
{if(start==0)
{ischecked=!$(this).attr("checked");}
start=1;$(this).attr("checked",ischecked);$('#li'+$(this).attr('id')).addClass('curr_input');}})
$('input[name=all'+objname[i]+']').attr('checked',true);}
$('#totalday').html($("input[name='rights[]']:checked").size());})
$("input[name='rights[]']").click(function()
{if($(this).attr('checked')==true)
$('#li'+$(this).attr('id')).addClass('curr_input');else
$('#li'+$(this).attr('id')).removeClass('curr_input');$('#totalday').html($("input[name='rights[]']:checked").size());var weeknumber=$(this).val().split('_');var i=0;$(".more_input input").each(function(){if($(this).attr('id').indexOf(weeknumber[0])!=-1&&$(this).attr('checked')==true)
i++;})
if(i==24)
{$('input[name=all'+weeknumber[0]+']').attr('checked',true);}
if(i!=24)
{$('input[name=all'+weeknumber[0]+']').attr('checked',false);}})
$("#checkrelexdate").click(function()
{var objname=new Array('Sunday','Saturday');$("input[name='rights[]']:checked").removeAttr("checked");$('.more_input li').removeClass('curr_input');$('.day_7 input').attr('checked',false);for(var i=0;i<objname.length;i++)
{var start=0;$(".more_input input").each(function()
{if($(this).attr('type')=="checkbox"&&$(this).attr('id').indexOf(objname[i])!=-1)
{if(start==0)
{ischecked=!$(this).attr("checked");}
start=1;$(this).attr("checked",ischecked);$('#li'+$(this).attr('id')).addClass('curr_input');}})
$('input[name=all'+objname[i]+']').attr('checked',true);}
$('#totalday').html($("input[name='rights[]']:checked").size());})
$(".day_7 input").click(function()
{var objname=$(this).attr('name').replace('all','');var start=0;$(".more_input input").each(function()
{if($(this).attr('type')=="checkbox"&&$(this).attr('id').indexOf(objname)!=-1)
{if(start==0)
{ischecked=!$(this).attr("checked");}
start=1;$(this).attr("checked",ischecked);if(ischecked)
{$('#li'+$(this).attr('id')).addClass('curr_input');}
else
{$('#li'+$(this).attr('id')).removeClass('curr_input');}}})
$('#totalday').html($("input[name='rights[]']:checked").size());})
$("#tt a").click(function()
{var objname=$(this).attr('name');var start=0;$("#.more_input input").each(function()
{if($(this).attr('type')=="checkbox"&&$(this).attr('id').indexOf(objname)!=-1)
{if(start==0)
{ischecked=!$(this).attr("checked");}
start=1;$(this).attr("checked",ischecked);if(ischecked)
{$('#li'+$(this).attr('id')).addClass('curr_input');}
else
{$('#li'+$(this).attr('id')).removeClass('curr_input');}}})
if(objname.indexOf('time')==-1)
{var i=0;$(".more_input input").each(function(){if($(this).attr('id').indexOf(objname)!=-1&&$(this).attr('checked')==true)
i++;})
if(i==24)
{$('input[name=all'+objname+']').attr('checked',true);}
if(i!=24)
{$('input[name=all'+objname+']').attr('checked',false);}}
if(objname.indexOf('time')!=-1)
{var weekname=new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Sunday','Saturday');for(var i=0;i<weekname.length;i++)
{var j=0;$(".more_input input").each(function(){if($(this).attr('id').indexOf(weekname[i])!=-1&&$(this).attr('checked')==true)
j++;})
if(j==24)
{$('input[name=all'+weekname[i]+']').attr('checked',true);}
if(j!=24)
{$('input[name=all'+weekname[i]+']').attr('checked',false);}}}
$('#totalday').html($("input[name='rights[]']:checked").size());})
$("#dwAccessall").click(function()
{$('#divdwAccesslist ul').each(function()
{if(!$(this).hasClass('li_bg_yell'))
{var spanname=$(this).attr('id').replace('access','');adddwaccess(spanname,$(this).attr('name'));}})})
$("#dwbrowserlanguageall").click(function()
{$('#divdwbrowserlanguagelist ul').each(function()
{if(!$(this).hasClass('li_bg_yell'))
{var spanname=$(this).attr('id').replace('browserlanguage','');adddwbrowserlanguage(spanname,$(this).attr('name'));}})})
$("#dwoptionsystemall").click(function()
{$('#divdwoptionsystemlist ul').each(function()
{if(!$(this).hasClass('li_bg_yell'))
{var spanname=$(this).attr('id').replace('optionsystem','');adddwoptionsystem(spanname,$(this).attr('name'));}})})
$("#dwRespectivelyrateall").click(function()
{$('#divdwRespectivelyratelist ul').each(function()
{if(!$(this).hasClass('li_bg_yell'))
{var spanname=$(this).attr('id').replace('Respectivelyrate','');adddwRespectivelyrate(spanname,$(this).attr('name'));}})})
$("#browsertypeall").click(function()
{$('#divdwbrowsertypelist ul').each(function()
{if(!$(this).hasClass('li_bg_yell'))
{var spanname=$(this).attr('id').replace('browsertype','');adddwbrowsertype(spanname,$(this).attr('name'));}})})
var areadiv_no1='';for(var i=0;i<json.length;i++)
{if(i==0)
{areadiv_no1+="<ul><li><input type='checkbox' value="+i+" name="+json[i].n+" id=inputprovince"+i+"><label id='province"+i+"'>"+json[i].n+"</label></li>";}
else{if(i%4==0)
{areadiv_no1+="<ul><li><input type='checkbox' value="+i+" name="+json[i].n+" id=inputprovince"+i+"><label id='province"+i+"'>"+json[i].n+"</label></li>";}
else if((i+1)%4==0)
{areadiv_no1+="<li><input type='checkbox' value="+i+" name="+json[i].n+" id=inputprovince"+i+"><label id='province"+i+"'>"+json[i].n+"</label></li></ul>";}
else
{areadiv_no1+="<li><input type='checkbox' value="+i+" name="+json[i].n+" id=inputprovince"+i+"><label id='province"+i+"'>"+json[i].n+"</label></li>";}}}
$('#areadiv').html(areadiv_no1);$("#flowDiv span").mousemove(function()
{$(this).addClass('xx');})
$("#areadiv label").mousemove(function()
{$(this).addClass('xx');var yy=$('#divdwterritory').offset().top+33;var xx=$(this).offset().left+45;$('#flowDiv').css({top:yy+'px',left:xx+'px'});var areaid=$(this).attr('id').replace('province','');$('#flowDiv div').remove();var statenum=0;var statenumno2=0;$('#selectareaid ul').each(function()
{if($(this).attr('id').replace('div','')==areaid)
{if($(this).attr('name')==1)
{for(var j=0;j<json[areaid].c.length;j++)
{$('#flowDiv').append("<div><label><input type='checkbox' value="+areaid+'_'+j+" name="+json[areaid].c[j]+"  onclick=changeflowinput("+areaid+",'"+json[areaid].n+"') checked><span id='"+areaid+'_'+j+"'>"+json[areaid].c[j]+"</span></label></div>");}}
if($(this).attr('name')==0)
{for(var j=0;j<json[areaid].c.length;j++)
{if(divexistyesorno(areaid+'_'+j))
{$('#flowDiv').append("<div><label><input type='checkbox' value="+areaid+'_'+j+" name="+json[areaid].c[j]+"  onclick=changeflowinput("+areaid+",'"+json[areaid].n+"')><span id='"+areaid+'_'+j+"'>"+json[areaid].c[j]+"</span></label></div>");}
else if(!divexistyesorno(areaid+'_'+j))
{$('#flowDiv').append("<div><label><input type='checkbox' value="+areaid+'_'+j+" name="+json[areaid].c[j]+"  onclick=changeflowinput("+areaid+",'"+json[areaid].n+"') checked><span id='"+areaid+'_'+j+"'>"+json[areaid].c[j]+"</span></label></div>");}}}}
else
{statenum++;}
statenumno2++;})
if(statenum==statenumno2)
{for(var j=0;j<json[areaid].c.length;j++)
{$('#flowDiv').append("<div><label><input type='checkbox' value="+areaid+'_'+j+" name="+json[areaid].c[j]+" onclick=changeflowinput("+areaid+",'"+json[areaid].n+"') ><span id='"+areaid+'_'+j+"'>"+json[areaid].c[j]+"</span></label></div>");}}
$('#flowDiv').show();})
$("#areadiv label").mouseout(function()
{$(this).removeClass('xx');})
$("#flowDiv").mouseleave(function()
{$('#flowDiv').hide();})
$("#areadiv input").click(function()
{if($(this).attr("checked")==true)
{$('#province'+$(this).val()).addClass('f12_y');if(divexistyesorno($(this).val()))
{$('#selectareaid').append("<ul id=div"+$(this).val()+" name='1'><li class='w1 ww1'>"+$(this).attr('name')+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+$(this).val()+"') id="+$(this).val()+">删除</a></li></ul>");}
else
{$('#div'+$(this).val()).remove();$("#selectareaid ul[name=div"+$(this).val()+"]").remove();$('#selectareaid').append("<ul id=div"+$(this).val()+" name='1'><li class='w1 ww1'>"+$(this).attr('name')+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+$(this).val()+"') id="+$(this).val()+">删除</a></li></ul>");}
$("#flowDiv input").attr('checked',true);}
if($(this).attr("checked")==false)
{$('#province'+$(this).val()).removeClass('f12_y');$('#div'+$(this).val()).remove();$("#selectareaid ul[name=div"+$(this).val()+"]").remove();$("#flowDiv input").attr('checked',false);}})
$("#areadiv label").click(function()
{var divid=$(this).attr('id');divid='input'+divid;if($('#'+divid).attr("checked")==false)
{$(this).addClass('f12_y');$('#'+divid).attr("checked",true);if(divexistyesorno($('#'+divid).val()))
{$('#selectareaid').append("<ul id=div"+$('#'+divid).val()+" name='1'><li class='w1 ww1'>"+$('#'+divid).attr('name')+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+$('#'+divid).val()+"') id="+$('#'+divid).val()+">删除</a></li></ul>");}
else
{$('#div'+$('#'+divid).val()).remove();$("#selectareaid ul[name=div"+$('#'+divid).val()+"]").remove();$('#selectareaid').append("<ul id=div"+$('#'+divid).val()+" name='1'><li class='w1 ww1'>"+$('#'+divid).attr('name')+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+$('#'+divid).val()+"') id="+$('#'+divid).val()+">删除</a></li></ul>");}}
else
{$(this).removeClass('f12_y');$('#div'+$('#'+divid).val()).remove();$("#selectareaid ul[name=div"+$('#'+divid).val()+"]").remove();$('#'+divid).attr('checked',false);}})
$("#delivery_put").click(function()
{if(!$("#delivery_put_all").is(":hidden")){$("#delivery_put_all").hide();$('#flowDiv').hide()}
else
{$("#delivery_put_all").show();}});$("#submitdateimg").click(function()
{submitdateimgclick();})
$("img[name=cancelimg]").click(function()
{$('#flowDiv').hide();$('#delivery_put_all').hide();})
$("#submittimeimg").click(function()
{submittimeimgclick();})
$("#submitterritoryimg").click(function()
{submitterritoryimgclick();})
$("#submitoptionsystemimg").click(function()
{submitoptionsystemimgclick();})
$("#submitAccessimg").click(function()
{submitAccessimgclick();})
$("#submitbrowsertypeimg").click(function()
{submitbrowsertypeimgclick();})
$("#submitbrowserlanguageimg").click(function()
{submitbrowserlanguageimgclick();})
$("#submitRespectivelyrateimg").click(function()
{submitRespectivelyrateimgclick();})
$("#submitaccessurlimg").click(function()
{
var dengyu=$('#dwdengyu').val();$('#accessurlyesorno').val(dengyu);

if(dengyu==1)
	{
		var accessurlstr='<li>受访url=</li>';
	}
else
	{
		var accessurlstr='<li>受访url≠</li>';
	}


$('#accessurlerror').hide();var accessurlliststr='accessurl='+dengyu+'¤';var accessurllist=$('#accessurltextarea').val();var txt_len=$.trim(accessurllist).length;if(txt_len==0)return false;var myReg=/^([\w-]+\.)+(\S)+$/i;var ss=$('#accessurltextarea').val().split('\n');for(var i=0;i<ss.length;i++)
{if($.trim(ss[i])=='')
{continue;}
/*else if(!myReg.test($.trim(ss[i])))
{$('#accessurlerror').show();$('#accessurlerror').html('格式不正确：'+htmlspecialchars(ss[i]));return false;}*/
else if($.trim(ss[i]).length>256)
{$('#accessurlerror').show();$('#accessurlerror').html('超度超过256');return false;}
else
{if(i==ss.length-1)
{accessurlstr+="<li>"+$.trim(ss[i])+"</li>";}
else
{accessurlstr+="<li>"+$.trim(ss[i])+",</li>";}
accessurlliststr+=encodeURIComponent($.trim(ss[i]))+'¤';}
$('#accessurlerror').hide();}
accessurlstr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick=modifydelivery(&quot;accessurl&quot;)>修改</a></li>"
$('#accessurlsubmitul').html(accessurlstr);$('#accessurldengyu').val(accessurlliststr);$('#accessurlsubmit').show();$('#delivery_put_all').hide();})
$("#submitdomainlimg").click(function()
{var dengyu=$('#dwdengyu').val();$('#domainyesorno').val(dengyu);

if(dengyu==1)
	{
		var domainstr='<li>来路域名=</li>';
	}
else
	{
		var domainstr='<li>来路域名≠</li>';
	}

$('#domainerror').hide();var domainliststr='domain='+dengyu+'@';var domainlist=$('#domaintextarea').val();var txt_len=$.trim(domainlist).length;if(txt_len==0)return false;var myReg=/^([a-z0-9-]{1,}.)?[a-z0-9-]{1,}.([a-z0-9-]{1,}.)?[a-z0-9]{2,}$/i;var ss=$('#domaintextarea').val().split('\n');for(var i=0;i<ss.length;i++)
{if(ss[i]!='(direct)'&&ss[i]!='（direct）')
{if($.trim(ss[i])=='')
{continue;}
else if(!myReg.test($.trim(ss[i])))
{$('#domainerror').show();$('#domainerror').html('格式不正确：'+htmlspecialchars(ss[i]));return false;}
else
{if(i==ss.length-1)
{domainstr+="<li>"+$.trim(ss[i])+"</li>";}
else
{domainstr+="<li>"+$.trim(ss[i])+",</li>";}
domainliststr+=$.trim(ss[i])+'@';}}
else
{if(i==ss.length-1)
{domainstr+="<li>direct</li>";}
else
{domainstr+="<li>direct,</li>";}
domainliststr+="(direct)@";}
$('#accessurlerror').hide();}
domainstr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick=modifydelivery(&quot;domain&quot;)>修改</a></li>"
$('#domainsubmitul').html(domainstr);$('#domaindengyu').val(domainliststr);$('#domainsubmit').show();$('#delivery_put_all').hide();})
$("#delivery_name").blur(function(){var delivery_name=$('#delivery_name').val().replace("&","(a)");var delivery_name1=$('#delivery_name').val();var a=/select|insert|update|dalete|\'|\/\*|\.\.\/|union|into|load_file|outfile/;if(a.test(delivery_name)){$("#checkdelivery_name").show();$("#checkdelivery_name").html('广告名格式有误');return false;}

if(htmlspecialchars(delivery_name1)=='11')
{$('#checkdelivery_name').hide();$('#checkdelivery_name').html('');}
if(htmlspecialchars(delivery_name1)!=''&&htmlspecialchars(delivery_name1)!=('11'))
{$.ajax({type:'POST',url:'?mo=delivery&fo=delivery_checkname&ro=s&sid=61037&pid=89476',data:'delivery_name='+delivery_name+'&date='+new Date(),success:function(msg)
{if(msg.indexOf('guanli_session_timeout_list')!=-1)
{window.location.href='?mo=login&fo=login_timeout';}
else
{if(msg!=0)
{if(msg==-11)
{$("#checkdelivery_name").show();$("#checkdelivery_name").html('广告名格式有误');}
else
{$('#checkdelivery_name').show();$('#checkdelivery_name').html('广告名重复');}}
else if(msg==0)
{$('#checkdelivery_name').hide();$('#checkdelivery_name').html('');}}}});}})
$("#starttimeclock").focus(function(){$('#checksubmittimeclock').hide();})
$("#endtimeclock").focus(function(){$('#checksubmittimeclock').hide();})
$("#delivery_create_order").click(function(){$('.cj_con select').hide();BOX_show('g_namediv');var date=new Date();var startoMyDatestring=numchangedate(date);$('#g_namediv input[type=text]').val('');$('#order_starttime').val(startoMyDatestring);orderininttable();})
$("#delivery_price").keyup(function(){var delivery_price=$('#delivery_price').val();var f=/^\d+(\.\d{1,2})?$/;var z=/^([1-9][0-9]*)$/　;var txt_len=$.trim(delivery_price).length;if(txt_len!=0)
{if(!f.test(delivery_price)&&!z.test(delivery_price)&&$('#price_mode').val()!='cpa')
{$('#checkdelivery_price').show();$('#checkdelivery_price').html('请输入计费价格，最多两位小数');}
else if(txt_len>1000000)
{$('#checkdelivery_price').show();$('#checkdelivery_price').html('价格超过了最大值1000000');}
else
{$('#checkdelivery_price').hide();}}
else
{$('#checkdelivery_price').hide();}})
$("#delivery_num").keyup(function(){if(!$("#delivery_smailnum").is(":hidden"))
{var txt_len=$.trim($('#delivery_num').val()).length;if(txt_len!=0)
{var z=/^([1-9][0-9]*)$/　;if(!z.test($('#delivery_num').val()))
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');}
else if($('#delivery_num').val()>1000000000)
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');}
else
{$('#checkdaymax').hide();}}
else
{$('#checkdaymax').hide();}}})
$("#delealldatedw").click(function(){var ecT_count=0;for(var i in ecT.cache.selectedDates){if(ecT.cache.selectedDates[i]==true){ecT.deleteSelect($clock(i+randid),i)
ecT_count++;}}
datedb=[];datedb2=[];$('#debug p').remove();$('#datedwnumall').html(0);})
var beginclock='0';$('#starttimeclock option').each(function(){if($(this).val()==beginclock)
$(this).attr('selected',true);})
var modifyendtime='0';if(modifyendtime==0)
{$('#notimelimit').show();$('#endtimeset').hide();}
else
{$('#notimelimit').hide();$('#endtimeset').show();$('#endtimedate').val(modifyendtime); settotaldays();var endclock='24';$('#endtimeclock option').each(function(){if($(this).val()==endclock)
$(this).attr('selected',true);})}
var modify_priority_type='2';$("#priority_type option").each(function(){if($(this).val()==modify_priority_type)
$(this).attr('selected',true);})
var modifypriority_weight='5';$('#priority_weight option').each(function(){if($(this).val()==modifypriority_weight)
$(this).attr('selected',true);})
var modifychange_mode='cpm';
$('#price_mode option').each(function()
{

if($(this).val()==modifychange_mode)$(this).attr('selected',true);

})

 if(modifychange_mode=='cpa')
	{
		$('#cpahide').hide();
	}

if(modifychange_mode=='cpd')
{$('#charge_mode_list').html('元/天');}
if(modifychange_mode=='cpt')
{$('#charge_mode_list').html('元/小时');}
if(modifychange_mode=='cpm')
{$('#charge_mode_list').html('元/千次展现');}
if(modifychange_mode=='cpc')
{$('#charge_mode_list').html('元/每次点击');}

var pmodifychange_mode="cpm";

if(pmodifychange_mode=='cpc')
	{
		$('#everydaylimitspan').html("每天点击：");
		$('#hourmaxlimit_div').hide();
	}
else
	{
		$('#everydaylimitspan').html("每天展现：");
		$('#hourmaxlimit_div').show();
	}


$('#charge_mode option').each(function()
{

if($(this).val()==pmodifychange_mode)$(this).attr('selected',true);

})

var modifychange_num=0;
var modifydaymax=0;
var modifyper_hour_max = 0;
$('#cpdnumber').hide();
$('#orthernumber').show();
$('#everydaylimitdiv').show();

if(modifychange_num)
{$('#delivery_bignum').hide();$('#delivery_smailnum').show();$('#delivery_num').val(modifychange_num);$('#deliverynumlimitdiv').show();
$('#deliverynumlimit').attr('src','images/down2.gif');
}
else
{$('#delivery_bignum').show();$('#delivery_smailnum').hide();}
if(modifydaymax || modifyper_hour_max)
{
	if(modifydaymax){
		$('#day_max2').show();
		$('#day_max1').hide();
	}
	if(modifyper_hour_max){
		$('#hour_max2').show();
		$('#hour_max1').hide();
	}
	$('#day_max').val(modifydaymax);
	$('#per_hour_max').val(modifyper_hour_max);
	$('#deliverynumlimitdiv').show();
	$('#deliverynumlimit').attr('src','images/down2.gif');

if(pmodifychange_mode=='cpm')
{$('#everydaylimitspan').html('每天上限：');}
else if(pmodifychange_mode=='cpc')
{$('#everydaylimitspan').html('每天上限：');}}
else
{$('#day_max1').show();$('#day_max2').hide();$('#day_max').val('');}




var slot_status=1;if(slot_status==0)
{$('#checksubmitslotname').show();$('#checksubmitslotname').html('处于删除状态，请更改广告位');}
var order_status=1;if(order_status==0)
{$('#checksubmitordername').show();$('#checksubmitordername').html('处于删除状态，请更改订单');}
var d_orientation='#########￠';var d_orientationarray=d_orientation.split('#');var d_orientation_area=d_orientationarray[0];if(d_orientation_area!=''&&d_orientation_area!=undefined)
{var d_orientation_area_array=d_orientation_area.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_area_array[0].replace('area=',''))
{$(this).attr('selected',true);}})
for(var j=1;j<d_orientation_area_array.length-1;j++)
{if(d_orientation_area_array[j].indexOf('_')==-1)
{$('#selectareaid').append("<ul name='1' id='div"+d_orientation_area_array[j]+"'><li class='w1 ww1'>"+json[d_orientation_area_array[j]].n+"</li> <li class='w2'><a id='"+d_orientation_area_array[j]+"' onclick=deletediv('"+d_orientation_area_array[j]+"') href='javascript:'>删除</a></li></ul>");$('#inputprovince'+d_orientation_area_array[j]).attr('checked',true);$('#province'+d_orientation_area_array[j]).addClass('f12_y');}
else
{var citycode=d_orientation_area_array[j].split('_');if($("#selectareaid ul[id=div"+citycode[0]+"]").size()==0)
{$('#selectareaid').append("<ul name='0' id='div"+citycode[0]+"'><li class='w1 ww1'><img onclick='changeopenorclose("+citycode[0]+")' style='cursor: pointer;' src='../Public/images/jian.gif'>"+json[citycode[0]].n+"</li> <li class='w2'><a id='"+citycode[0]+"' onclick=deletediv('"+citycode[0]+"') href='javascript:'>删除</a></li></ul>");$('#inputprovince'+citycode[0]).attr('checked',true);$('#province'+citycode[0]).addClass('f12_y');}
$('#selectareaid').append("<ul name='div"+citycode[0]+"' id='div"+d_orientation_area_array[j]+"'>&nbsp;&nbsp;&nbsp;<li class='w1'>"+json[citycode[0]].c[citycode[1]]+"</li> <li class='w2'><a id='"+d_orientation_area_array[j]+"' onclick=deletediv('"+d_orientation_area_array[j]+"') href='javascript:'>删除</a></li></ul>");}}
submitterritoryimgclick();}
var d_orientation_date=d_orientationarray[1];if(d_orientation_date!=undefined&&d_orientation_date!='')
{var d_orientation_date_array=d_orientation_date.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_date_array[0].replace('date=',''))
{$(this).attr('selected',true);}})
for(var i=1;i<d_orientation_date_array.length-1;i++)
{datedb.push(d_orientation_date_array[i]);if(d_orientation_date_array[i].indexOf('^')==-1)
{datedb2.push(d_orientation_date_array[i]);var datedeleteheng=d_orientation_date_array[i].replace('-','');var datedeleteheng=datedeleteheng.replace('-','');$('#'+datedeleteheng+randid).addClass('isSelected');ecT.cache.selectedDates[datedeleteheng]=true;}
else
{var dateletetwoarray=d_orientation_date_array[i].split('^');var deletedays=DateDiff(dateletetwoarray[0],dateletetwoarray[1]);var deleteclassday=dateletetwoarray[0];for(var j=0;j<=deletedays;j++)
{datedb2.push(deleteclassday);var datedeleteheng=deleteclassday.replace('-','');var datedeleteheng=datedeleteheng.replace('-','');$('#'+datedeleteheng+randid).addClass('isSelected');ecT.cache.selectedDates[datedeleteheng]=true;deleteclassday=GetnextDay(deleteclassday);}}}
var datedwnumall=0;for(var i in ecT.cache.selectedDates){if(ecT.cache.selectedDates[i]==true){datedwnumall++;}}
$('#datedwnumall').html(datedwnumall);var datestring='';for(var i=0;i<datedb.length;i++)
{datestring+='<p>'+datedb[i].replace('^','至')+'</p>';}
document.getElementById('debug').innerHTML=datestring;submitdateimgclick();}
var d_orientation_time=d_orientationarray[2];if(d_orientation_time!=undefined&&d_orientation_time!='')
{var d_orientation_time_array=d_orientation_time.split('@');for(var i=0;i<d_orientation_time_array.length-1;i++)
{var d_orientation_time_array_day=d_orientation_time_array[i].split('-');if(d_orientation_time_array_day[1]==0)
{}
else if(d_orientation_time_array_day[1]==24)
{$(".day_7 input[name=all"+d_orientation_time_array_day[0]+"]").attr('checked',true);$(".more_input input").each(function()
{if($(this).val().indexOf(d_orientation_time_array_day[0])!=-1)
{$(this).attr('checked',true);$('#li'+$(this).attr('id')).addClass('curr_input');}})}
else
{var d_orientation_time_array_day_every=d_orientation_time_array_day[1].split('*');for(var j=0;j<d_orientation_time_array_day_every.length-1;j++)
{var d_orientation_time_array_day_every_noe=d_orientation_time_array_day_every[j];if(d_orientation_time_array_day_every_noe.indexOf('~')!=-1)
{var d_orientation_time_array_day_every_two=d_orientation_time_array_day_every_noe.split('~');for(var k=parseInt(d_orientation_time_array_day_every_two[0]);k<=parseInt(d_orientation_time_array_day_every_two[1]);k++)
{$("input[value="+d_orientation_time_array_day[0]+"_time"+k+"]").attr('checked',true);$('#li'+$("input[value="+d_orientation_time_array_day[0]+"_time"+k+"]").attr('id')).addClass('curr_input');}}
else
{$("input[value="+d_orientation_time_array_day[0]+"_time"+d_orientation_time_array_day_every_noe+"]").attr('checked',true);$('#li'+$("input[value="+d_orientation_time_array_day[0]+"_time"+d_orientation_time_array_day_every_noe+"]").attr('id')).addClass('curr_input');}}}}
$('#totalday').html($("input[name='rights[]']:checked").size());submittimeimgclick();}
var d_orientation_access=d_orientationarray[3];if(d_orientation_access!=undefined&&d_orientation_access!='')
{var d_orientation_access_array=d_orientation_access.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_access_array[0].replace('access=',''))
{$(this).attr('selected',true);}})
for(var j=1;j<d_orientation_access_array.length-1;j++)
{if(d_orientation_access_array[j]=='liantong')
{var accessmodifyname='联通';}
if(d_orientation_access_array[j]=='dianxin')
{var accessmodifyname='电信';}
if(d_orientation_access_array[j]=='jiaoyu')
{var accessmodifyname='教育';}
if(d_orientation_access_array[j]=='wangba')
{var accessmodifyname='网吧';}
if(d_orientation_access_array[j]=='yidong')
{var accessmodifyname='移动';}
if(d_orientation_access_array[j]=='qita')
{var accessmodifyname='其它';}
$('#dwaccessrow').append("<ul name='"+accessmodifyname+"' id='select"+d_orientation_access_array[j]+"'><li class='w1'>"+accessmodifyname+"</li><li onclick=deletedwaccess('"+d_orientation_access_array[j]+"','"+accessmodifyname+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>");$('#access'+d_orientation_access_array[j]).addClass('li_bg_yell');$('#spanadd'+d_orientation_access_array[j]).html('已添加');$('#spanadd'+d_orientation_access_array[j]).css("color","#FF9101");$('#spanadd'+d_orientation_access_array[j]).css("text-decoration","none");}
submitAccessimgclick();}
var d_orientation_browsertype=d_orientationarray[4];if(d_orientation_browsertype!=undefined&&d_orientation_browsertype!='')
{var d_orientation_browsertype_array=d_orientation_browsertype.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_browsertype_array[0].replace('browsertype=',''))
{$(this).attr('selected',true);}})
for(var j=1;j<d_orientation_browsertype_array.length-1;j++)
{if(d_orientation_browsertype_array[j]=='InternetExplorer6')
{var browsertypemodifyname='微软IE6';}
if(d_orientation_browsertype_array[j]=='InternetExplorer7')
{var browsertypemodifyname='微软IE7';}
if(d_orientation_browsertype_array[j]=='InternetExplorer8')
{var browsertypemodifyname='微软IE8';}
if(d_orientation_browsertype_array[j]=='InternetExplorer9')
{var browsertypemodifyname='微软IE9';}
if(d_orientation_browsertype_array[j]=='360safe')
{var browsertypemodifyname='360安全浏览器';}
if(d_orientation_browsertype_array[j]=='TT')
{var browsertypemodifyname='腾讯TT';}
if(d_orientation_browsertype_array[j]=='sougou')
{var browsertypemodifyname='搜狗';}
if(d_orientation_browsertype_array[j]=='Maxthon')
{var browsertypemodifyname='遨游Maxthon';}
if(d_orientation_browsertype_array[j]=='TheWorld')
{var browsertypemodifyname='世界之窗TheWorld';}
if(d_orientation_browsertype_array[j]=='FireFox')
{var browsertypemodifyname='火狐FireFox';}
if(d_orientation_browsertype_array[j]=='Chrome')
{var browsertypemodifyname='谷歌Chrome';}
if(d_orientation_browsertype_array[j]=='Safari')
{var browsertypemodifyname='苹果Safari';}
if(d_orientation_browsertype_array[j]=='Opera')
{var browsertypemodifyname='Opera';}
if(d_orientation_browsertype_array[j]=='uc')
{var browsertypemodifyname='uc浏览器';}
if(d_orientation_browsertype_array[j]=='qq')
{var browsertypemodifyname='QQ浏览器';}
if(d_orientation_browsertype_array[j]=='qita')
{var browsertypemodifyname='其它';}
$('#dwbrowsertype').append("<ul name='"+browsertypemodifyname+"' id='select"+d_orientation_browsertype_array[j]+"'><li class='w1'>"+browsertypemodifyname+"</li><li onclick=deletedwbrowsertype('"+d_orientation_browsertype_array[j]+"','"+browsertypemodifyname+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>");$('#browsertype'+d_orientation_browsertype_array[j]).addClass('li_bg_yell');$('#liadd'+d_orientation_browsertype_array[j]).html('已添加');$('#liadd'+d_orientation_browsertype_array[j]).css("color","#FF9101");$('#liadd'+d_orientation_browsertype_array[j]).css("text-decoration","none");}
submitbrowsertypeimgclick();}
var d_orientation_browserlanguage=d_orientationarray[5];if(d_orientation_browserlanguage!=undefined&&d_orientation_browserlanguage!='')
{var d_orientation_browserlanguage_array=d_orientation_browserlanguage.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_browserlanguage_array[0].replace('browserlanguage=',''))
{$(this).attr('selected',true);}})
for(var j=1;j<d_orientation_browserlanguage_array.length-1;j++)
{if(d_orientation_browserlanguage_array[j]=='chineses')
{var browserlanguagemodifyname='简体中文';}
if(d_orientation_browserlanguage_array[j]=='chinesec')
{var browserlanguagemodifyname='繁体中文';}
if(d_orientation_browserlanguage_array[j]=='english')
{var browserlanguagemodifyname='英语';}
if(d_orientation_browserlanguage_array[j]=='japanese')
{var browserlanguagemodifyname='日语';}
if(d_orientation_browserlanguage_array[j]=='kourou')
{var browserlanguagemodifyname='韩语';}
if(d_orientation_browserlanguage_array[j]=='qita')
{var browserlanguagemodifyname='其它';}
$('#dwbrowserlanguagerow').append("<ul name='"+browserlanguagemodifyname+"' id='select"+d_orientation_browserlanguage_array[j]+"'><li class='w1'>"+browserlanguagemodifyname+"</li><li onclick=deletedwbrowserlanguage('"+d_orientation_browserlanguage_array[j]+"','"+browserlanguagemodifyname+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>");$('#browserlanguage'+d_orientation_browserlanguage_array[j]).addClass('li_bg_yell');$('#librowserlanguage'+d_orientation_browserlanguage_array[j]).html('已添加');$('#librowserlanguage'+d_orientation_browserlanguage_array[j]).css("color","#FF9101");$('#librowserlanguage'+d_orientation_browserlanguage_array[j]).css("text-decoration","none");}
submitbrowserlanguageimgclick();}
var d_orientation_optionsystemlist=d_orientationarray[6];if(d_orientation_optionsystemlist!=undefined&&d_orientation_optionsystemlist!='')
{var d_orientation_optionsystemlist_array=d_orientation_optionsystemlist.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_optionsystemlist_array[0].replace('optionsystem=',''))
{$(this).attr('selected',true);}})
for(var j=1;j<d_orientation_optionsystemlist_array.length-1;j++)
{if(d_orientation_optionsystemlist_array[j]=='qita')
{var optionsystemlistmodifyname='其它';}
else
{var optionsystemlistmodifyname=d_orientation_optionsystemlist_array[j];}
$('#dwoptionsystemrow').append("<ul name='"+optionsystemlistmodifyname+"' id='select"+d_orientation_optionsystemlist_array[j]+"'><li class='w1'>"+optionsystemlistmodifyname+"</li><li onclick=deletedwoptionsystem('"+d_orientation_optionsystemlist_array[j]+"','"+optionsystemlistmodifyname+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>");$('#optionsystem'+d_orientation_optionsystemlist_array[j]).addClass('li_bg_yell');$('#lioptionsystem'+d_orientation_optionsystemlist_array[j]).html('已添加');$('#lioptionsystem'+d_orientation_optionsystemlist_array[j]).css("color","#FF9101");$('#lioptionsystem'+d_orientation_optionsystemlist_array[j]).css("text-decoration","none");}
submitoptionsystemimgclick();$('#dwoptionsystemnum').html("共"+$('#dwoptionsystemrow ul').size()+"条");}
var d_orientation_Respectivelyrate=d_orientationarray[7];if(d_orientation_Respectivelyrate!=undefined&&d_orientation_Respectivelyrate!='')
{var d_orientation_Respectivelyrate_array=d_orientation_Respectivelyrate.split('@');$('#dwdengyu option').each(function(){if($(this).val()==d_orientation_Respectivelyrate_array[0].replace('Respectivelyrate=',''))
{$(this).attr('selected',true);}})
for(var j=1;j<d_orientation_Respectivelyrate_array.length-1;j++)
{if(d_orientation_Respectivelyrate_array[j]=='qita')
{var Respectivelyratemodifyname='其它';$('#dwRespectivelyraterow').append("<ul name='"+Respectivelyratemodifyname+"' id='select"+d_orientation_Respectivelyrate_array[j]+"'><li class='w1'>"+Respectivelyratemodifyname+"</li><li onclick=deletedwRespectivelyrate('"+d_orientation_Respectivelyrate_array[j]+"','"+Respectivelyratemodifyname+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>");}
else
{var Respectivelyratemodifyname=d_orientation_Respectivelyrate_array[j].replace('_','*');$('#dwRespectivelyraterow').append("<ul name='"+d_orientation_Respectivelyrate_array[j]+"' id='select"+d_orientation_Respectivelyrate_array[j]+"'><li class='w1'>"+Respectivelyratemodifyname+"</li><li onclick=deletedwRespectivelyrate('"+d_orientation_Respectivelyrate_array[j]+"','"+d_orientation_Respectivelyrate_array[j]+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>");}
$('#Respectivelyrate'+d_orientation_Respectivelyrate_array[j]).addClass('li_bg_yell');$('#liRespectivelyrate'+d_orientation_Respectivelyrate_array[j]).html('已添加');$('#liRespectivelyrate'+d_orientation_Respectivelyrate_array[j]).css("color","#FF9101");$('#liRespectivelyrate'+d_orientation_Respectivelyrate_array[j]).css("text-decoration","none");}
submitRespectivelyrateimgclick();}
var d_orientationarray_url=d_orientation.split('￠');var d_orientation_accessurl=d_orientationarray_url[1];

if(d_orientation_accessurl!=undefined&&d_orientation_accessurl!='')
{var accessurltextareastring='';var d_orientation_accessurl_array=d_orientation_accessurl.split('¤');


if(d_orientation_accessurl_array[0].indexOf('accessurl=')!=-1)
	{
		var domainj=1;
		var domainsplit = d_orientation_accessurl_array[0];
	}
else
	{
		var domainj=0;
		var domainsplit = 'accessurl=1';
	}






for(var j=domainj;j<d_orientation_accessurl_array.length-1;j++)
{if(j==d_orientation_accessurl_array.length-2)
{accessurltextareastring+=d_orientation_accessurl_array[j];}
else
{accessurltextareastring+=d_orientation_accessurl_array[j]+'\n';}}

$('#accessurltextarea').val(accessurltextareastring);

var accessyeor = domainsplit.split("=");

$('#accessurlyesorno').val(accessyeor[1]);
if(accessyeor[1]==1)
	{
		var accessurlstr='<li>受访url=</li>';
	}
else if(accessyeor[1]==0)
	{
		var accessurlstr='<li>受访url≠</li>';
	}


var accessurlliststr='accessurl='+accessyeor[1]+'¤'; var accessurllist=$('#accessurltextarea').val();var txt_len=$.trim(accessurllist).length;if(txt_len==0)return false;var myReg=/^([\w-]+\.)+(\S)+$/i;var ss=$('#accessurltextarea').val().split('\n');for(var i=0;i<ss.length;i++)
{if($.trim(ss[i])=='')
{continue;}
/*else if(!myReg.test($.trim(ss[i])))
{$('#accessurlerror').show();$('#accessurlerror').html('格式不正确：'+htmlspecialchars(ss[i]));return false;}*/
else
{if(i==ss.length-1)
{accessurlstr+="<li>"+$.trim(ss[i])+"</li>";}
else
{accessurlstr+="<li>"+$.trim(ss[i])+",</li>";}
accessurlliststr+=$.trim(ss[i])+'¤';}
$('#accessurlerror').hide();}
accessurlstr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick=modifydelivery(&quot;accessurl&quot;)>修改</a></li>"
$('#accessurlsubmitul').html(accessurlstr);$('#accessurldengyu').val(accessurlliststr);$('#accessurlsubmit').show();$('#delivery_put_all').hide();}
var d_orientation_domain=d_orientationarray[8];if(d_orientation_domain!=undefined&&d_orientation_domain!='')
{var domaintextareastring='';

var d_orientation_domain_array=d_orientation_domain.split('@');

if(d_orientation_domain_array[0].indexOf('domain=')!=-1)
	{
		var domainj=1;
		var domainsplit = d_orientation_domain_array[0];
	}
else
	{
		var domainj=0;
		var domainsplit = 'domain=1';
	}


for(var j=domainj;j<d_orientation_domain_array.length-1;j++)
{if(j==d_orientation_domain_array.length-2)
{domaintextareastring+=d_orientation_domain_array[j];}
else
{domaintextareastring+=d_orientation_domain_array[j]+'\n';}}
$('#domaintextarea').val(domaintextareastring);

var domainyeor=domainsplit.split('=');

if(domainyeor[1]==1)
var domainstr='<li>来路域名=</li>';
else if(domainyeor[1]==0)
var domainstr='<li>来路域名≠</li>';

$('#domainyesorno').val(domainyeor[1]);
var domainliststr='domain='+domainyeor[1]+'@';var domainlist=$('#domaintextarea').val();var txt_len=$.trim(domainlist).length;if(txt_len==0)return false;var myReg=/^([a-z0-9-]{1,}.)?[a-z0-9-]{1,}.([a-z0-9-]{1,}.)?[a-z0-9]{2,}$/i;var ss=$('#domaintextarea').val().split('\n');for(var i=0;i<ss.length;i++)
{if(ss[i]!='(direct)'&&ss[i]!='（direct）')
{if($.trim(ss[i])=='')
{continue;}
else if(!myReg.test($.trim(ss[i])))
{$('#domainerror').show();$('#domainerror').html('格式不正确：'+htmlspecialchars(ss[i]));return false;}
else
{if(i==ss.length-1)
{domainstr+="<li>"+$.trim(ss[i])+"</li>";}
else
{domainstr+="<li>"+$.trim(ss[i])+",</li>";}
domainliststr+=$.trim(ss[i])+'@';}}
else
{if(i==ss.length-1)
{domainstr+="<li>direct</li>";}
else
{domainstr+="<li>direct,</li>";}
domainliststr+="(direct)@";}
$('#accessurlerror').hide();}
domainstr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick=modifydelivery(&quot;domain&quot;) >修改</a></li>"
$('#domainsubmitul').html(domainstr);$('#domaindengyu').val(domainliststr);$('#domainsubmit').show();$('#delivery_put_all').hide();}
var orientationstringall="";var orientatarray=orientationstringall.split('#');for(var kii=0;kii<orientatarray.length-1;kii++)
{var orienatonearray=orientatarray[kii].split('@');for(var ikk=1;ikk<orienatonearray.length-1;ikk++)
addorientationoneul(orienatonearray[0],orienatonearray[ikk]);submitorientation(orienatonearray[0],orienatonearray[0]);}});
console.log(jsonarea);


function getcompanyload()
{var cd_mask=$("#company_search_cd").val();if(cd_mask=='输入广告主名称关键字')
{cd_mask='';}
jQuery("#companygridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_company_server&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask+'&nd='+new Date().getTime(),page:1}).trigger("reloadGrid");}
function getdailiload()
{var cd_mask=$("#daili_search_cd").val();if(cd_mask=='输入代理商名称关键字')
{cd_mask='';}
jQuery("#dailigridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_daili_server&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask+'&nd='+new Date().getTime(),page:1}).trigger("reloadGrid");}
function getlinkmanload()
{var cd_mask=$("#linkman_search_cd").val();var companyname=$('#companygridTablevalue').val();if(cd_mask=='输入联系人名称关键字')
{cd_mask='';}
jQuery("#linkmangridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_linkman_bigset&ro=s&sid=61037&pid=89476&companyname="+companyname+'&cd_mask='+cd_mask+'&nd='+new Date().getTime(),page:1}).trigger("reloadGrid");}
function getdaililinkmanload()
{var cd_mask=$("#daililinkman_search_cd").val();var companyname=$('#dailigridTablevalue').val();if(cd_mask=='输入联系人名称关键字')
{cd_mask='';}
jQuery("#daililinkgridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_daililink_bigset&ro=s&sid=61037&pid=89476&companyname="+companyname+'&cd_mask='+cd_mask+'&nd='+new Date().getTime(),page:1}).trigger("reloadGrid");}
function orderininttable()
{$("#salemangridTable").jqGrid({datatype:"json",url:'?mo=order&fo=order_saleman_server&ro=s&sid=61037&pid=89476&nd='+new Date().getTime(),height:320,colNames:[" ","姓名","电子邮件"],colModel:[{name:'checkbox',index:'checkbox',width:90,sorttype:"string",sortable:false,align:"center"},{name:'username',index:'username',width:250,align:"center",sortable:false},{name:'email',index:'email',width:250,align:"center",sortable:false}],sortname:'username',sortorder:'asc',viewrecords:true,rowNum:10,height:'auto',rowList:[5,10,20,30],scrollrows:true,pager:"#salemangridPager"});jQuery("#salemangridTable").jqGrid('navGrid','salemangridPager',{edit:false,add:false,del:false,search:false});jQuery("#salemangridTable").navGrid('#salemangridPager',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#salemangridPager',{caption:"取消",onClickButton:function()
{$('#salemangridTablehead').hide();$('#salemangridTablebody').hide();},position:"frist"})
$("#companygridTable").jqGrid({datatype:"json",url:'?mo=order&fo=order_company_server&ro=s&sid=61037&pid=89476&nd='+new Date().getTime(),height:320,colNames:[" ","公司名称"],colModel:[{name:'checkbox',index:'checkbox',width:90,sorttype:"string",sortable:false,align:"center"},{name:'username',index:'username',width:500,align:"",sortable:false}],viewrecords:true,rowNum:5,height:'auto',rowList:[5,10,20,30],scrollrows:true,pager:"#companygridPager",gridComplete:function(){var companyname=$('#companygridTablevalue').val();$("#companygridTable input[value="+companyname+"]").attr('checked',true);}});jQuery("#companygridTable").jqGrid('navGrid','companygridPager',{edit:false,add:false,del:false,search:false});jQuery("#companygridTable").navGrid('#companygridPager',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#companygridPager',{caption:"取消",onClickButton:function()
{$('#companygridTablehead').hide();$('#companygridTablebody').hide();$('#companygridTablevalue').val(0);$('#selectcompanygridTable').html('默认公司');$('#linkmangridTablevalue').val('');$('#selectlinkmangridTable').html('选择联系人');$("#companygridTable input[value=0]").attr('checked',true);},position:"frist"})
$("#linkmangridTable").jqGrid({datatype:"json",url:'?mo=order&fo=order_linkman_server&ro=s&sid=61037&pid=89476&nd='+new Date().getTime(),height:320,colNames:[" ","姓名","邮箱"],colModel:[{name:'checkbox',index:'checkbox',width:90,sorttype:"string",sortable:false,align:"center"},{name:'username',index:'username',width:250,align:"center",sortable:false},{name:'email',index:'email',width:250,align:"center",sortable:false}],viewrecords:true,rowNum:5,height:'auto',rowList:[5,10,20,30],scrollrows:true,pager:"#linkmangridPager",gridComplete:function(){var linkmanid=$('#linkmangridTablevalue').val();$("#linkmangridTable input[value="+linkmanid+"]").attr('checked',true);var gridTable_record=jQuery('#linkmangridTable').jqGrid('getGridParam','records');if(gridTable_record==0)
{$('#linkmangridTable').append("<tr><td colspan='3' style='border-top: 1px solid #C4D5DD;'><div class='first_adddd' >暂无数据</div></td></tr>");$('#linkmangridTablecnzzpagelist').append("<option>1/1</option>");$('.first_adddd').css('margin-left','280px');$('.first_adddd').css('height','80px');$('.first_adddd').css('line-height','80px');}}});jQuery("#linkmangridTable").jqGrid('navGrid','linkmangridPager',{edit:false,add:false,del:false,search:false});jQuery("#linkmangridTable").navGrid('#linkmangridPager',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#linkmangridPager',{caption:"取消",onClickButton:function()
{$('#linkmangridTablehead').hide();$('#linkmangridTablebody').hide();$('#linkmangridTablediv').hide();},position:"frist"})
$("#dailigridTable").jqGrid({datatype:"json",url:'?mo=order&fo=order_daili_server&ro=s&sid=61037&pid=89476&nd='+new Date().getTime(),height:320,colNames:[" ","代理公司名称"],colModel:[{name:'checkbox',index:'checkbox',width:90,sorttype:"string",sortable:false,align:"center"},{name:'username',index:'username',width:500,align:"",sortable:false}],viewrecords:true,rowNum:5,height:'auto',rowList:[5,10,20,30],scrollrows:true,pager:"#dailigridPager",gridComplete:function(){var companyname=$('#dailigridTablevalue').val();$("#dailigridTable input[value="+companyname+"]").attr('checked',true);}});jQuery("#dailigridTable").jqGrid('navGrid','dailigridPager',{edit:false,add:false,del:false,search:false});jQuery("#dailigridTable").navGrid('#dailigridPager',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#dailigridPager',{caption:"取消",onClickButton:function()
{$('#dailigridTablehead').hide();$('#dailigridTablebody').hide();$('#dailigridTablevalue').val(0);$('#selectdailigridTable').html('默认公司');$('#daililinkgridTablevalue').val('');$('#selectdaililinkgridTable').html('选择联系人');$("#dailigridTable input[value=0]").attr('checked',true);},position:"frist"})
$("#daililinkgridTable").jqGrid({datatype:"json",url:'?mo=order&fo=order_daililink_server&ro=s&sid=61037&pid=89476&nd='+new Date().getTime(),height:320,colNames:[" ","姓名","邮箱"],colModel:[{name:'checkbox',index:'checkbox',width:90,sorttype:"string",sortable:false,align:"center"},{name:'username',index:'username',width:250,align:"center",sortable:false},{name:'email',index:'email',width:250,align:"center",sortable:false}],viewrecords:true,rowNum:5,height:'auto',rowList:[5,10,20,30],scrollrows:true,pager:"#daililinkgridPager",gridComplete:function(){var daililinkid=$('#daililinkgridTablevalue').val();$("#daililinkgridTable input[value="+daililinkid+"]").attr('checked',true);var gridTable_record=jQuery('#daililinkgridTable').jqGrid('getGridParam','records');if(gridTable_record==0)
{$('#daililinkgridTable').append("<tr><td colspan='3' style='border-top: 1px solid #C4D5DD;'><div class='first_adddd' >暂无数据</div></td></tr>");$('#daililinkgridTablecnzzpagelist').append("<option>1/1</option>");$('.first_adddd').css('margin-left','280px');$('.first_adddd').css('height','80px');$('.first_adddd').css('line-height','80px');}}});jQuery("#daililinkgridTable").jqGrid('navGrid','daililinkgridPager',{edit:false,add:false,del:false,search:false});jQuery("#daililinkgridTable").navGrid('#daililinkgridPager',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#daililinkgridPager',{caption:"取消",onClickButton:function()
{$('#daililinkgridTablehead').hide();$('#daililinkgridTablebody').hide();$('#daililinkgridTablediv').hide();},position:"frist"})}
function submitRespectivelyrateimgclick(){if($('#dwRespectivelyraterow ul').size()!=0)
{$('#Respectivelyratesubmit').show();$('#delivery_put_all').hide();var dengyu=$('#dwdengyu').val();$('#Respectivelyrateyesorno').val(dengyu);var Respectivelyratelist='Respectivelyrate='+dengyu+'@';$('#dwRespectivelyraterow ul').each(function(){Respectivelyratelist+=$(this).attr('name')+'@';})
if(dengyu==1)
var Respectivelyratestr='<li>分辨率=</li>';else
var Respectivelyratestr='<li>分辨率≠</li>';$('#dwRespectivelyraterow ul').each(function(){Respectivelyratestr+="<li>"+$(this).attr('name').replace('_','*')+"</li>";})
Respectivelyratestr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"Respectivelyrate\")'>修改</a></li>";$('#Respectivelyratesubmitul').html(Respectivelyratestr);$('#Respectivelyratedengyu').val(Respectivelyratelist);}}
function submitoptionsystemimgclick(){if($('#dwoptionsystemrow ul').size()!=0)
{$('#optionsystemsubmit').show();$('#delivery_put_all').hide();var dengyu=$('#dwdengyu').val();$('#optionsystemyesorno').val(dengyu);var optionsystemlist='optionsystem='+dengyu+'@';$('#dwoptionsystemrow ul').each(function(){optionsystemlist+=$(this).attr('name')+'@';})
if(dengyu==1)
var optionsystemstr='<li>操作系统=</li>';else
var optionsystemstr='<li>操作系统≠</li>';$('#dwoptionsystemrow ul').each(function(){optionsystemstr+="<li>"+$(this).attr('name')+"</li>";})
optionsystemstr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"optionsystem\")'>修改</a></li>";$('#optionsystemsubmitul').html(optionsystemstr);$('#optionsystemdengyu').val(optionsystemlist);}}
function submitbrowserlanguageimgclick()
{if($('#dwbrowserlanguagerow ul').size()!=0)
{$('#browserlanguagesubmit').show();$('#delivery_put_all').hide();var dengyu=$('#dwdengyu').val();$('#browserlanguageyesorno').val(dengyu);var browserlanguagelist='browserlanguage='+dengyu+'@';$('#dwbrowserlanguagerow ul').each(function(){browserlanguagelist+=$(this).attr('id').replace('select','')+'@';})
if(dengyu==1)
var browserlanguagestr='<li>浏览器语言=</li>';else
var browserlanguagestr='<li>浏览器语言≠</li>';$('#dwbrowserlanguagerow ul').each(function(){browserlanguagestr+="<li>"+$(this).attr('name')+"</li>";})
browserlanguagestr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"browserlanguage\")'>修改</a></li>";$('#browserlanguagesubmitul').html(browserlanguagestr);$('#browserlanguagedengyu').val(browserlanguagelist);}}
function submitbrowsertypeimgclick(){if($('#dwbrowsertype ul').size()!=0)
{$('#browsertypesubmit').show();$('#delivery_put_all').hide();var dengyu=$('#dwdengyu').val();$('#browsertypeyesorno').val(dengyu);var browsertypelist='browsertype='+dengyu+'@';$('#dwbrowsertype ul').each(function(){browsertypelist+=$(this).attr('id').replace('select','')+'@';})
if(dengyu==1)
var browsertypestr='<li>浏览器类型=</li>';else
var browsertypestr='<li>浏览器类型≠</li>';$('#dwbrowsertype ul').each(function(){browsertypestr+="<li>"+$(this).attr('name')+"</li>";})
browsertypestr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"browsertype\")'>修改</a></li>";$('#browsertypesubmitul').html(browsertypestr);$('#browsertypedengyu').val(browsertypelist);}}
function submitAccessimgclick()
{if($('#dwaccessrow ul').size()!=0)
{$('#Accesssubmit').show();$('#delivery_put_all').hide();var dengyu=$('#dwdengyu').val();$('#Accessyesorno').val(dengyu);var Accesslist='access='+dengyu+'@';$('#dwaccessrow ul').each(function(){Accesslist+=$(this).attr('id').replace('select','')+'@';})
if(dengyu==1)
var Accessstr='<li>接入商=</li>';else
var Accessstr='<li>接入商≠</li>';$('#dwaccessrow ul').each(function(){Accessstr+="<li>"+$(this).attr('name')+"</li>";})
Accessstr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"Access\")'>修改</a></li>";$('#Accesssubmitul').html(Accessstr);$('#Accessdengyu').val(Accesslist);}}
function submittimeimgclick()
{if($('#totalday').html()!=0)
{$('#timedengyu').val('');var weekname=new Array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');var timestr='';for(var i=0;i<weekname.length;i++)
{var weekarray=new Array();$(".more_input input").each(function()
{if($(this).attr('id').indexOf(weekname[i])!=-1&&$(this).attr('checked')==true)
{var daynum=$(this).val().split('_');var dayno=daynum[1].replace('time','');weekarray.push(dayno);}})
timestr+=submitimgstr(weekarray,weekname[i])+'</p>';}
timestr+="<p class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"time\")'>修改</a> </p>";$('#timesubmit').show();$('#delivery_put_all').hide();$('#timesubmitdiv').html(timestr);}}
function submitterritoryimgclick(){if($('#selectareaid ul').size()!=0)
{$('#territorysubmit').show();$('#delivery_put_all').hide();var dengyu=$('#dwdengyu').val();$('#territoryyesorno').val(dengyu);var arealist='area='+dengyu+'@';$('#selectareaid ul').each(function(){if($(this).attr('name')=='1')
{arealist+=$(this).attr('id').replace('div','')+'@';}
if($(this).attr('name')!='0'&&$(this).attr('name')!='1')
{arealist+=$(this).attr('id').replace('div','')+'@';}})
if(dengyu==1)
var territorystr='<li>地域=</li>';else
var territorystr='<li>地域≠</li>';$('#areadiv input').each(function()
{if($(this).attr('checked')==true)
territorystr+="<li>"+$(this).attr('name')+"</li>";});territorystr+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"territory\")'>修改</a></li>";$('#territorysubmitul').html(territorystr);$('#territorydengyu').val(arealist);$('#flowDiv').hide();}}
function submitdateimgclick()
{if($('#debug p').size()!=0)
{var dengyu=$('#dwdengyu').val();if(dengyu==1)
var datestring='<li>日期=</li>';else
var datestring='<li>日期≠</li>';$('#dateyesorno').val(dengyu);var datedengyu='date='+dengyu+'@';for(var i=0;i<datedb.length;i++)
{datestring+='<li>'+datedb[i].replace('^','至')+'</li>';datedengyu+=datedb[i]+'@';}
$("#datesubmit").show();datestring+="<li class='blue'><a href='#dingxiangtoufanglist' onclick='modifydelivery(\"date\")'>修改</a></li>";$('#datesubmitul').html(datestring);$('#delivery_put_all').hide();$('#datedengyu').val(datedengyu);}}
function addDate(oDate,iDate){var ms=oDate.getTime();ms+=iDate*24*60*60*1000;return new Date(ms);}
function numchangedate(d)
{var vYear=d.getFullYear();var vMon=d.getMonth()+1;var vDay=d.getDate();vMon=vMon<10?"0"+vMon:vMon;vDay=vDay<10?"0"+vDay:vDay
var ordertoday=vYear+'-'+vMon+'-'+vDay;return ordertoday;}
function slot_rejqgrid()
{var cd_mask=jQuery("#slot_search").val();if(cd_mask=='输入广告位名称关键字')
cd_mask='';
var channelid	=	$("#channelid").val();

session_timeout();jQuery("#slotgridTable").jqGrid('setGridParam',{url:"?mo=delivery&fo=delivery_create_slot_bigset&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask+"&channel="+channelid,page:1}).trigger("reloadGrid");}
function orderregrid()
{var cd_mask=jQuery("#order_search").val();if(cd_mask=='输入订单名称关键字')
cd_mask='';session_timeout();jQuery("#ordergridTable").jqGrid('setGridParam',{url:"?mo=delivery&fo=delivery_create_order_bigset&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask,page:1}).trigger("reloadGrid");}
function submitimgstr(weekarray,today)
{var weekss=new Array();var todayname;var timestr='';var timedengyu='';switch(today)
{case'Monday':todayname='星期一';break;case'Tuesday':todayname='星期二';break;case'Wednesday':todayname='星期三';break;case'Thursday':todayname='星期四';break;case'Friday':todayname='星期五';break;case'Saturday':todayname='星期六';break;case'Sunday':todayname='星期日';break;default:todayname='错误！';}
timestr="<p>"+todayname+":";timedengyu=today+"-";if(weekarray.length==24)
{timestr+='全天投放';timedengyu+='24';}
else if(weekarray.length==0)
{timestr+='全天暂停';timedengyu+='0';}
else{for(var i=0;i<weekarray.length;i++)
{var day=parseInt(weekarray[i]);if(weekss.length==0)
{weekss.push(weekarray[i]);}
else
{var subflag=true;for(var j=0;j<weekss.length;j++)
{if(weekss[j].indexOf('~')==-1)
{if(day-parseInt(weekss[j])==1)
{weekss[j]=weekss[j]+'~'+day;subflag=false;}}
else
{var ssss=weekss[j].split('~');if(day-parseInt(ssss[1])==1)
{weekss[j]=ssss[0]+'~'+day;subflag=false;}}}
if(subflag)
{weekss.push(weekarray[i]);}}}
for(var k=0;k<weekss.length;k++)
{if(weekss[k].indexOf('~')==-1)
{timestr+=weekss[k]+":00&nbsp;&nbsp;";}
else
{var sskk=weekss[k].split('~');timestr+=sskk[0]+":00"+"~"+sskk[1]+":00&nbsp;&nbsp;";}
timedengyu+=weekss[k]+'*';}}
var timedengyustr=$('#timedengyu').val();timedengyustr+=timedengyu+'@';$('#timedengyu').val(timedengyustr);return timestr;}
function changeflowinput(areaid,name)
{if($("#flowDiv input:checked").size()>0)
{$('#inputprovince'+areaid).attr('checked',true);$('#province'+areaid).addClass('f12_y');}
if(json[areaid].c.length!=$("#flowDiv input:checked").size())
{if(divexistyesorno(areaid))
{$('#selectareaid').append("<ul id=div"+areaid+" name='0'><li class='w1 ww1'><img src='../Public/images/jian.gif' style='cursor:pointer'onclick='changeopenorclose("+areaid+")'>"+name+"</li> <li class='w2'><a href='javascript:'onclick=deletediv('"+areaid+"') id="+areaid+">删除</a></li></ul>");}
else if(!divexistyesorno(areaid))
{$("#div"+areaid).attr('name','0');$("#div"+areaid).html("<li  class='w1 ww1'><img src='../Public/images/jian.gif' style='cursor:pointer' onclick='changeopenorclose("+areaid+")'>"+name+"</li> <li class='w2'><a href='javascript:'onclick=deletediv('"+areaid+"') id="+areaid+">删除</a></li>");}
$("#selectareaid ul[name=div"+areaid+"]").remove();$("#flowDiv input:checked").each(function()
{$("<ul id=div"+$(this).val()+" name=div"+areaid+"><li class='w1'>"+$(this).attr('name')+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+$(this).val()+"') id="+$(this).val()+">删除</a></li></ul>").insertAfter("#div"+areaid);})}
if(json[areaid].c.length==$("#flowDiv input:checked").size())
{$('#div'+areaid).remove();$("#selectareaid ul[name=div"+areaid+"]").remove();$('#selectareaid').append("<ul id=div"+areaid+" name='1'><li class='w1 ww1'>"+name+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+areaid+"') id="+areaid+">删除</a></li></ul>");}
if($("#flowDiv input:checked").size()==0)
{$('#div'+areaid).remove();$("#selectareaid ul[name=div"+areaid+"]").remove();$('#inputprovince'+areaid).attr('checked',false);$('#province'+areaid).removeClass('f12_y');}}
function changeopenorclose(areaid)
{if($('#div'+areaid+' img').attr('src').indexOf('../Public/images/jian.gif')!=-1)
{$("#selectareaid ul[name=div"+areaid+"]").hide();$('#div'+areaid+' img').attr('src','images/jia.gif');}
else if($('#div'+areaid+' img').attr('src').indexOf('images/jia.gif')!=-1)
{$("#selectareaid ul[name=div"+areaid+"]").show();$('#div'+areaid+' img').attr('src','../Public/images/jian.gif');}}
function deletediv(id)
{if(id.indexOf('_')!=-1)
{$('#div'+id).remove();var divid=id.split('_');if($('#selectareaid ul[name=div'+divid[0]+']').size()==0)
{$('#div'+divid[0]).remove();$('#inputprovince'+divid[0]).attr('checked',false);$('#province'+divid[0]).removeClass('f12_y');}}
else
{$('#div'+id).remove();$("#selectareaid ul[name=div"+id+"]").remove();$('#inputprovince'+id).attr('checked',false);$('#province'+id).removeClass('f12_y');}}
function divexistyesorno(areaid)
{var statenum=0;var statenumno2=0;var statedivyeorno=false;$('#selectareaid ul').each(function()
{if($(this).attr('id').replace('div','')==areaid)
{}
else
{statenumno2++;}
statenum++;})
if(statenum==statenumno2)
{statedivyeorno=true;}
return statedivyeorno;}
function adddwaccess(name,chinesename)
{if(!$('#access'+name).hasClass('li_bg_yell'))
{$('#spanadd'+name).html('已添加');$('#spanadd'+name).css("color","#FF9101");$('#spanadd'+name).css("text-decoration","none");$('#access'+name).addClass('li_bg_yell');$('#dwaccessrow').append("<ul id=select"+name+" name="+chinesename+"><li class='w1'>"+chinesename+"</li><li class='w2' style='color:#3377AA;cursor:pointer;text-decoration:underline;'onclick=deletedwaccess('"+name+"','"+chinesename+"')> 删除</li></ul>");$('#dwaccessnum').html("共"+$('#dwaccessrow ul').size()+"条");}}
function deletedwaccess(name,chinesename)
{$('#access'+name).removeClass('li_bg_yell');$('#spanadd'+name).html('添加');$('#spanadd'+name).css("color","#3377AA");$('#spanadd'+name).css("text-decoration","underline");$('#dwaccessrow #select'+name).remove();$('#dwaccessnum').html("共"+$('#dwaccessrow ul').size()+"条");}
function deletealldwaccess()
{$('#dwaccessrow ul').each(function()
{deletedwaccess($(this).attr('id').replace('select',''),$(this).attr('name'));})
$('#Accessdengyu').val('');}
function adddwbrowsertype(name,chinesename)
{if(!$('#browsertype'+name).hasClass('li_bg_yell'))
{$('#browsertype'+name).addClass('li_bg_yell');$('#liadd'+name).html('已添加');$('#liadd'+name).css("color","#FF9101");$('#liadd'+name).css("text-decoration","none");$('#dwbrowsertype').append("<ul id=select"+name+" name="+chinesename+"><li class='w1'>"+chinesename+"</li><li class='w2' style='color:#3377AA;cursor:pointer;text-decoration:underline;'onclick=deletedwbrowsertype('"+name+"','"+chinesename+"')> 删除</li></ul>");$('#dwbrowsertypenum').html("共"+$('#dwbrowsertype ul').size()+"条");}}
function deletedwbrowsertype(name,chinesename)
{$('#browsertype'+name).removeClass('li_bg_yell');$('#liadd'+name).html('添加');$('#liadd'+name).css("color","#3377AA");$('#liadd'+name).css("text-decoration","underline");$('#dwbrowsertype #select'+name).remove();$('#dwbrowsertypenum').html("共"+$('#dwbrowsertype ul').size()+"条");}
function deletealldwbrowsertype()
{$('#dwbrowsertype ul').each(function()
{deletedwbrowsertype($(this).attr('id').replace('select',''),$(this).attr('name'));})
$('#browsertypedengyu').val('');}
function adddwbrowserlanguage(name,chinesename)
{if(!$('#browserlanguage'+name).hasClass('li_bg_yell'))
{$('#browserlanguage'+name).addClass('li_bg_yell');$('#librowserlanguage'+name).html('已添加');$('#librowserlanguage'+name).css("color","#FF9101");$('#librowserlanguage'+name).css("text-decoration","none");$('#dwbrowserlanguagerow').append("<ul id=select"+name+" name="+chinesename+"><li class='w1'>"+chinesename+"</li><li class='w2' style='color:#3377AA;cursor:pointer;text-decoration:underline;'onclick=deletedwbrowserlanguage('"+name+"','"+chinesename+"')> 删除</li></ul>");$('#dwbrowserlanguagenum').html("共"+$('#dwbrowserlanguagerow ul').size()+"条");}}
function deletedwbrowserlanguage(name,chinesename)
{$('#browserlanguage'+name).removeClass('li_bg_yell');$('#librowserlanguage'+name).html('添加');$('#librowserlanguage'+name).css("color","#3377AA");$('#librowserlanguage'+name).css("text-decoration","underline");$('#dwbrowserlanguagerow #select'+name).remove();$('#dwbrowserlanguagenum').html("共"+$('#dwbrowserlanguagerow ul').size()+"条");}
function deletealldwbrowserlanguage()
{$('#dwbrowserlanguagerow ul').each(function()
{deletedwbrowserlanguage($(this).attr('id').replace('select',''),$(this).attr('name'));})
$('#browserlanguagedengyu').val('');}
function adddwoptionsystem(name,chinesename)
{if(!$('#optionsystem'+name).hasClass('li_bg_yell'))
{$('#optionsystem'+name).addClass('li_bg_yell');$('#lioptionsystem'+name).html('已添加');$('#lioptionsystem'+name).css("color","#FF9101");$('#lioptionsystem'+name).css("text-decoration","none");$('#dwoptionsystemrow').append("<ul id=select"+name+" name="+chinesename+"><li class='w1'>"+chinesename+"</li><li class='w2' style='color:#3377AA;cursor:pointer;text-decoration:underline;'onclick=deletedwoptionsystem('"+name+"','"+chinesename+"')> 删除</li></ul>");$('#dwoptionsystemnum').html("共"+$('#dwoptionsystemrow ul').size()+"条");}}
function deletedwoptionsystem(name,chinesename)
{$('#optionsystem'+name).removeClass('li_bg_yell');$('#lioptionsystem'+name).html('添加');$('#lioptionsystem'+name).css("color","#3377AA");$('#lioptionsystem'+name).css("text-decoration","underline");$('#dwoptionsystemrow #select'+name).remove();$('#dwoptionsystemnum').html("共"+$('#dwoptionsystemrow ul').size()+"条");}
function deletealldwoptionsystem()
{$('#dwoptionsystemrow ul').each(function()
{deletedwoptionsystem($(this).attr('id').replace('select',''),$(this).attr('name'));})
$('#optionsystemdengyu').val('');}
function adddwRespectivelyrate(name,chinesename)
{if(!$('#Respectivelyrate'+name).hasClass('li_bg_yell'))
{$('#Respectivelyrate'+name).addClass('li_bg_yell');$('#liRespectivelyrate'+name).html('已添加');$('#liRespectivelyrate'+name).css("color","#FF9101");$('#liRespectivelyrate'+name).css("text-decoration","none");$('#dwRespectivelyraterow').append("<ul id=select"+name+" name="+chinesename+"><li class='w1'>"+chinesename.replace('_','*')+"</li><li class='w2' style='color:#3377AA;cursor:pointer;text-decoration:underline;'onclick=deletedwRespectivelyrate('"+name+"','"+chinesename+"')> 删除</li></ul>");$('#dwRespectivelyratenum').html("共"+$('#dwRespectivelyraterow ul').size()+"条");}}
function deletedwRespectivelyrate(name,chinesename)
{$('#Respectivelyrate'+name).removeClass('li_bg_yell');$('#liRespectivelyrate'+name).html('添加');$('#liRespectivelyrate'+name).css("color","#3377AA");$('#liRespectivelyrate'+name).css("text-decoration","underline");$('#dwRespectivelyraterow #select'+name).remove();$('#dwRespectivelyratenum').html("共"+$('#dwRespectivelyraterow ul').size()+"条");}
function deletealldwRespectivelyrate()
{$('#dwRespectivelyraterow ul').each(function()
{deletedwRespectivelyrate($(this).attr('id').replace('select',''),$(this).attr('name'));})
$('#Respectivelyratedengyu').val('');}
function closedeliverydiv(area)
{$('#'+area+'submit').hide();if(area=='territory')
{deleteallarea();}
else if(area=='date')
{for(var i in ecT.cache.selectedDates){if(ecT.cache.selectedDates[i]==true){ecT.deleteSelect($clock(i+randid),i)}}
datedb=[];datedb2=[];$('#debug p').remove();$('#datedwnumall').html(0);$('#datedengyu').val('');}
else if(area=='time')
{$('#tt input').attr('checked',false);$('#tt li').removeClass('curr_input');$('#totalday').html('0');$('#timedengyu').val('');}
else if(area=='Access')
{deletealldwaccess();}
else if(area=='browsertype')
{deletealldwbrowsertype();}
else if(area=='browserlanguage')
{deletealldwbrowserlanguage();}
else if(area=='optionsystem')
{deletealldwoptionsystem();}
else if(area=='Respectivelyrate')
{deletealldwRespectivelyrate();}
else if(area=='accessurl')
{$('#accessurltextarea').val('');$('#accessurldengyu').val('');}
else if(area=='domain')
{$('#domaintextarea').val('');$('#domaindengyu').val('');}
else
{deleteallorientation(area);var orientationstringall=$('#orientationstringall').val();var orientationstringallist=orientationstringall.split('#');var orientstate=true;for(var i=0;i<orientationstringallist.length-1;i++)
{var orientationonearray=orientationstringallist[i].split('@');if(orientationonearray[0]==area)
{orientationstringallist.splice(i,1);}}
var orientationstring1="";for(var i=0;i<orientationstringallist.length-1;i++)
{orientationstring1+=orientationstringallist[i]+'#'}
orientationstringall=orientationstring1;$('#orientatistringall').val(orientationstringall);}}
function modifydelivery(area)
{if(area=='time')
{
	$('#dwdengyu').hide();
	$('#dwdengyu option[value=1]').html('等于');
	$('#dwdengyu option[value=0]').html('不等于');
}
else if(area=='accessurl')
	{
		$('#dwdengyu option[value=1]').html('包含');
		$('#dwdengyu option[value=0]').html('不包含');
	}
else{
	    $('#dwdengyu option[value=1]').html('等于');
		$('#dwdengyu option[value=0]').html('不等于');
	}


$('#dwselect').val('dw'+area);$('#dwdengyu').val($('#'+area+'yesorno').val());$('#delivery_put_all').show();$('#divdw'+area).show();$('#divdw'+area).siblings().hide();}
function orderisValidate()
{var order_state=true;var order_name=$('#order_name').val();var txt_len=$.trim(order_name).length;if(txt_len==0){$('#checkorder_name').show();$('#checkorder_name').html('订单名称不能为空');order_state=false;}
if(txt_len>100){$('#checkorder_name').show();$('#checkorder_name').html('输入的姓名超过了最大限制100个字');order_state=false;}
var checkorder_name=$('#checkorder_name').html();if(checkorder_name!='')order_state=false;var stattime=$('#order_starttime').val();var endtime=$('#order_endtime').val();if(endtime!='')
{if(endtime<stattime){$('#checkordertime').show();$('#checkordertime').html('填写时间有误');order_state=false;}}
var checkordertime=$('#checkordertime').html();if(checkordertime!='')order_state=false;var companygridTablevalue=$('#companygridTablevalue').val();if(companygridTablevalue==''){$('#companygridTablevalue').val(0);}
var order_descripe=$('#order_descripe').val();var txt_len=$.trim(order_descripe).length;if(txt_len>2500){$('#check_order_descripe').show();$('#check_order_descripe').html('输入的备注超过了最大限制2500个字');order_state=false;}
var order_code=$('#order_code').val();var txt_len=$.trim(order_code).length;if(txt_len>100){$('#checkorder_code').show();$('#checkorder_code').html('输入超过了最大限制100个字');order_state=false;}
if(!order_state)
{return false;}
var adm_cnzz_token=$('#adm_cnzz_token').val();$.ajax({type:'POST',url:'?mo=delivery&fo=delivery_order_add&ro=s&sid=61037&pid=89476',data:'order_name='+order_name+'&order_code='+$('#order_code').val()+'&order_code='+$('#order_code').val()+'&order_starttime='+$('#order_starttime').val()+'&order_endtime='+$('#order_endtime').val()+'&order_descripe='+$('#order_descripe').val()+'&salemangridTablevalue='+$('#salemangridTablevalue').val()+'&companygridTablevalue='+$('#companygridTablevalue').val()+'&linkmangridTablevalue='+$('#linkmangridTablevalue').val()+'&dailigridTablevalue='+$('#dailigridTablevalue').val()+'&daililinkgridTablevalue='+$('#daililinkgridTablevalue').val()+'&order_checkbox='+$('#order_checkbox').val()+'&adm_cnzz_token='+adm_cnzz_token+'&date='+new Date(),success:function(msg)
{if(msg.indexOf('guanli_session_timeout_list')-1>=0){window.location.href='?mo=login&fo=login_timeout';}
else if(msg.indexOf('nocooikelimit')!=-1)
{window.location.href='?mo=login&fo=login_no_limit';}
else{if(msg!='error'){$('#selectordertable').html(htmlspecialchars(order_name));$('#selectorderid').val(msg);$('#order_name').val('');$('#ordergridTable').trigger("reloadGrid");BOX_remove('g_namediv');}}}});}
function showsaleman()
{$('#salemangridTablehead').show();$('#salemangridTablebody').show();}
function showcompany()
{var companyname=$('#companygridTablevalue').val();if(companyname==0)
{$("#companygridTable input").attr('checked',false);}
else
{$("#companygridTable input[value="+companyname+"]").attr('checked',true);}
$('#companygridTablehead').show();$('#companygridTablebody').show();$('#linkmangridTablehead').hide();$('#linkmangridTablebody').hide();$('#linkmangridTablediv').hide();$('#dailigridTablehead').hide();$('#dailigridTablebody').hide();$('#daililinkgridTablehead').hide();$('#daililinkgridTablebody').hide();$('#daililinkgridTablediv').hide();}
function showlinkman()
{var companyname=$('#companygridTablevalue').val();jQuery("#linkmangridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_linkman_bigset&ro=s&sid=61037&pid=89476&companyname="+companyname,page:1}).trigger("reloadGrid");$('#linkmangridTablehead').show();$('#linkmangridTablebody').show();$('#linkmangridTablediv').show();$('#dailigridTablehead').hide();$('#dailigridTablebody').hide();$('#daililinkgridTablehead').hide();$('#daililinkgridTablediv').hide();$('#daililinkgridTablebody').hide();$('#companygridTablehead').hide();$('#companygridTablebody').hide();}
function showdaili()
{var companyname=$('#dailigridTablevalue').val();if(companyname==0)
{$("#dailigridTable input").attr('checked',false);}
else
{$("#dailigridTable input[value="+companyname+"]").attr('checked',true);}
$('#dailigridTablehead').show();$('#dailigridTablebody').show();$('#daililinkgridTablehead').hide();$('#daililinkgridTablebody').hide();$('#daililinkgridTablediv').hide();$('#companygridTablehead').hide();$('#companygridTablebody').hide();$('#linkmangridTablehead').hide();$('#linkmangridTablebody').hide();$('#linkmangridTablediv').hide();}
function showdaililink()
{var companyname=$('#dailigridTablevalue').val();jQuery("#daililinkgridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_daililink_bigset&ro=s&sid=61037&pid=89476&companyname="+companyname,page:1}).trigger("reloadGrid");$('#daililinkgridTablehead').show();$('#daililinkgridTablebody').show();$('#daililinkgridTablediv').show();$('#companygridTablehead').hide();$('#companygridTablebody').hide();$('#linkmangridTablehead').hide();$('#linkmangridTablediv').hide();$('#linkmangridTablebody').hide();$('#dailigridTablehead').hide();$('#dailigridTablebody').hide();}
function getsalemanload()
{var cd_mask=$("#saleman_search_cd").val();jQuery("#salemangridTable").jqGrid('setGridParam',{url:"?mo=order&fo=order_saleman_bigset&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask,page:1}).trigger("reloadGrid");}
function deleteallarea()
{var ss=new Array();$('#selectareaid ul').each(function(){ss.push($(this).attr('id').replace('div',''));})
for(var i=0;i<ss.length;i++)
{deletediv(ss[i]);}
$('#territorydengyu').val('');}
function addallarea()
{$("#selectareaid ul").remove();$('#areadiv label').each(function(){var divid=$(this).attr('id');divid='input'+divid;$(this).addClass('f12_y');$('#'+divid).attr("checked",true);$('#selectareaid').append("<ul id=div"+$('#'+divid).val()+" name='1'><li class='w1 ww1'>"+$('#'+divid).attr('name')+"</li> <li class='w2'><a href='javascript:' onclick=deletediv('"+$('#'+divid).val()+"') id="+$('#'+divid).val()+">删除</a></li></ul>");})}
$(document).ready(function()
{$("#order_name").blur(function(){var order_name=$('#order_name').val();$.ajax({type:'POST',url:'?mo=order&fo=order_ordernamecheck&ro=s&sid=61037&pid=89476',data:'order_name='+order_name+'&date='+new Date(),success:function(msg)
{if(msg.indexOf('guanli_session_timeout_list')-1>=0)
{window.location.href='?mo=login&fo=login_timeout';}
else
{if(msg!=0)
{$('#checkorder_name').show();$('#checkorder_name').html('订单名重复');}}}});});$("#ordercalendarT").mouseleave(function(){$('#ordercalendarT').hide();});$("#ordercalendarTend").mouseleave(function(){$('#ordercalendarTend').hide();});$("#order_name").focus(function(){$('#checkorder_name').hide();$('#checkorder_name').html('');});$("#order_checkbox").change(function(){if($('#order_checkbox').attr('checked')==true)
$('#order_checkbox').val('1');else
$('#order_checkbox').val('0');});jQuery("#order_starttime").focus(function()
{$('#checkordertime').hide();$('#checkordertime').html('');});jQuery("#order_endtime").focus(function()
{$('#checkordertime').hide();$('#checkordertime').html('');});$("#orderendtimenolimitchange").click(function(){$('#orderendtimenolimit').hide();$('#orderendtimelimit').show();var dateend=new Date();var dateendsteing=numchangedate(dateend);$('#order_endtime').val(dateendsteing);});$("#orderendtimelimitlimt").click(function(){$('#orderendtimenolimit').show();$('#orderendtimelimit').hide();$('#order_endtime').val('');});jQuery("#saleman_search_cd").keydown(function(e)
{if(e.keyCode==13)
{getsalemanload()}});jQuery("#order_starttime").click(function()
{jQuery('#ordercalendarT').show();jQuery('#ordercalendarTend').hide();var ecTt=new calendar();ecTt.properties.isMultipleSelect=false;ecTt.properties.callback=function(cal){for(var i in cal.cache.selectedDates){if(cal.cache.selectedDates[i]==true)
{var selectedDate=ecTt.stringToDate(i);getdate=selectedDate.getDate();if(selectedDate.getDate()<10)
{getdate='0'+selectedDate.getDate();}
getmonth=parseInt(selectedDate.getMonth()+1);if(getmonth<10)
{getmonth='0'+parseInt(selectedDate.getMonth()+1);}}}
jQuery('#order_starttime').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);jQuery('#ordercalendarT').hide();};var timearray=jQuery('#order_starttime').val().split('-');if(timearray[1]=='09')
{selectmonthfirst=9;}
else if(timearray[1]=='08')
{selectmonthfirst=8;}
else
{selectmonthfirst=parseInt(timearray[1]);}
if(timearray[2]=='09')
{selectdayfirst=9;}
else if(timearray[2]=='08')
{selectdayfirst=8;}
else
{selectdayfirst=parseInt(timearray[2]);}
ecTt.init(timearray[0],selectmonthfirst-1,'ordercalendarT',selectdayfirst);});jQuery("#order_endtime").click(function()
{jQuery('#ordercalendarTend').show();jQuery('#ordercalendarT').hide();var ecTt=new calendar();ecTt.properties.isMultipleSelect=false;ecTt.properties.callback=function(cal){for(var i in cal.cache.selectedDates){if(cal.cache.selectedDates[i]==true)
{var selectedDate=ecTt.stringToDate(i);getdate=selectedDate.getDate();if(selectedDate.getDate()<10)
{getdate='0'+selectedDate.getDate();}
getmonth=parseInt(selectedDate.getMonth()+1);if(getmonth<10)
{getmonth='0'+parseInt(selectedDate.getMonth()+1);}}}
jQuery('#order_endtime').val(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);jQuery('#ordercalendarTend').hide();};var timearray=jQuery('#order_endtime').val().split('-');if(timearray[1]=='09')
{selectmonthfirst=9;}
else if(timearray[1]=='08')
{selectmonthfirst=8;}
else
{selectmonthfirst=parseInt(timearray[1]);}
if(timearray[2]=='09')
{selectdayfirst=9;}
else if(timearray[2]=='08')
{selectdayfirst=8;}
else
{selectdayfirst=parseInt(timearray[2]);}
ecTt.init(timearray[0],selectmonthfirst-1,'ordercalendarTend',selectdayfirst);});});function salemancheck(table,id)
{if(table=='slotgridTable')
{var ret=jQuery("#"+table).jqGrid('getRowData',id);$('#slottable').hide();$('#slotnamechecked').html(ret.slotname);$('#m_slot_size').val(ret.size);$('#slot_source_material_id').val(ret.source_material_id);setslotsize();$('#submitslotname').val(id);$('#slotnamevalue').val(id);$("#slotgridTable input[value="+id+"]").attr('checked',true);$('#checksubmitslotname').hide();
	var material_change=0;if(material_change==0||material_change==1){material_change='';}
var cd_mask1=jQuery("#search_cd1").val();if(cd_mask1=='输入物料关键字')cd_mask1='';

if(ret.slotcodeinwhere==2){
		$('#time_a').hide();
		if($('#slotcodeinwhere').val()!=ret.slotcodeinwhere){
			setmobilecode();
			jQuery("#slotgridTable1").jqGrid('setGridParam',{url:"?mo=delivery&fo=material_list_bigset&slotpath=2&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask1+"&material_change="+material_change,page:1}).trigger("reloadGrid");
			
			var material_id_arr = $('#material_id').val().split(',');
			
			
			var material_id_count = material_id_arr.length;
			
			
				$("#list tr").each(function(){
				
					if($(this).attr('class')=='tr_white_tit'){
				if($(this).find('td').eq(2).find('div').attr('class')!='pic_i'&&$(this).find('td').eq(2).find('div').attr('class')!='font_i' ){
					$(this).remove();
					}
					}
				
				});
				if($("#list tr").size()==2){
				$('#list #num_0').show();
				}
			
			
		}
	}else{
		
		
		if($('#slotcodeinwhere').val()!=ret.slotcodeinwhere){
			setcumptercode();
			jQuery("#slotgridTable1").jqGrid('setGridParam',{url:"?mo=delivery&fo=material_list_bigset&slotpath=1&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask1+"&material_change="+material_change,page:1}).trigger("reloadGrid");
		}
	}
	$('#slotcodeinwhere').val(ret.slotcodeinwhere);



}
if(table=='ordergridTable')
{var ret=jQuery("#"+table).jqGrid('getRowData',id);$('#selectordertable').html(ret.ordername);$('#selectorderid').val(id);$('#ordergridTablehead').hide();$('#ordergridTablebody').hide();$('#ordergridTablediv').hide();$("#ordergridTable input[value="+id+"]").attr('checked',true);}
else{var ret=jQuery('#'+table).jqGrid('getRowData',id);$("#"+table+'head').hide();$("#"+table+'body').hide();$("#"+table+'div').hide();$('#select'+table).html(ret.username);$("#"+table+" input[value="+id+"]").attr('checked',true);$("#"+table+"value").val(id);if(table=='companygridTable')
{$('#linkmangridTablevalue').val('');$('#selectlinkmangridTable').html('选择联系人');}
if(table=='linkmangridTable')
{$.ajax({type:'POST',url:'?mo=order&fo=order_linkman_company&ro=s&sid=61037&pid=89476',dataType:'json',data:'linkman='+id+'&date='+new Date(),success:function(data)
{var dataObj=eval(data);var msg=dataObj.rows.cell;$('#selectcompanygridTable').html(msg[1]);$("#companygridTable input[value="+msg[0]+"]").attr('checked',true);$("#companygridTablevalue").val(msg[0]);}});}
if(table=='dailigridTable')
{$('#daililinkgridTablevalue').val('');$('#selectdaililinkgridTable').html('选择联系人');}
if(table=='daililinkgridTable')
{$.ajax({type:'POST',url:'?mo=order&fo=order_daililink_company&ro=s&sid=61037&pid=89476',dataType:'json',data:'linkman='+id+'&date='+new Date(),success:function(data)
{var dataObj=eval(data);var msg=dataObj.rows.cell;$('#selectdailigridTable').html(msg[1]);$("#daligridTable input[value="+msg[0]+"]").attr('checked',true);$("#dailigridTablevalue").val(msg[0]);}});}}}
	</script>
</head>

<body>
 <div id="flowDiv" style="height: 238px; display: none;"></div>
<div class="succ_box" style="width:150px;display:none;z-index:999" id="modifypic"><div class="succ_l">修改成功!</div><div class="succ_r"></div></div>
	  <div class="content" style="">

		   	   <div class="col_rs" style="">
		         
				 <div class="mx_title">
				      <div class="cj_l"></div>
					  <div class="cj_c">
					      修改广告
				      </div>
					  <div class="cj_r"></div>
				 </div>
                <div class="cj_con">
				<form action="" method="post">

				       <div class="put_adtit">
					   
					   <span><b>目标广告位：</b>

						<font id="slotnamechecked"></font>
					  <!-- <font id="slotnamechecked">1</font>  广告位名称在修改页面调取-->
					   
					   </span>
					   
					   <div class="put_edit"><a href="javascript:" id="slotchange" onclick="addAction()"></a>
					   
					   <div id="checksubmitslotname" class="tips_error left" style="display:none"></div>

					   <div id="checksubmitslotname1" class="tips_error left" style="width:205px;display:none"></div></div></div>
							<script>
							function addAction(){
								$("#form_name").val('');
								$("#form_info").val('');
								$("#form_sort").val('0');
								$("#formWindow").window('setTitle','新增广告位类型');
								$("#submit").unbind("click");
								$("#submit").bind("click",function(){
									$('.datagrid-btable tr').each(function(){
										var i = $('.datagrid-btable tr').index(this);
										if($(this).attr("class") == "datagrid-row datagrid-row-selected"){
											var text = $('.datagrid-btable tr')[i].cells[0].textContent
											$('#slotnamechecked').html(text);
											closeForm();

										}
									})
								
								});
								$("#formWindow").window('open');
								$("#myLayout").layout('resize');
								get_data();
							}

							function get_data(){
								$('#dgs').datagrid({   
									url:'<{:U("addjson")}>',   
									loadMsg:'数据正在加载，请稍候...',
									columns:[[
										{field:'name',title:'广告位名称',width:100},   
										{field:'channelid',title:'类型',width:100},   
										{field:'typeid',title:'分组',width:100,align:'right'},
										{field:'status',title:'尺寸',width:100,align:'right'}  
									]], 
									onClickRow:function(rowIndex){
										$('.datagrid-btable tr').removeClass("datagrid-row-selected");
										$($('.datagrid-btable tr')[rowIndex]).addClass("datagrid-row-selected");
										return false;
									}
								}); 
								
							}
							
							function closeForm(){
								$('#formWindow').window('close');
							}
							function checkOk(){
								
								
							
							}
							</script>
						<div id="formWindow" class="easyui-window" title="新增广告位类型" minimizable="false" collapsible="false" maximizable="false" closed="true" modal="true" style="width:500px;height:300px;padding:5px;">
	<div class="easyui-layout" fit="true" id="myLayout">
		<div region="center" border="false" style="padding:5px;background:#fafafa;border:1px solid #ccc;">
		<table id="dgs"></table> 
		</div>
		<div region="south" border="false" style="text-align:right;height:30px;line-height:30px;">
			<a class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" id="submit">确定</a>
			<a class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)" onclick="closeForm()">取消</a>
		</div>
	</div>
</div>
								   

			
					<div class="jb_info mar_t20">基本信息</div>


					<table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tbody><tr>
                            <td height="35" align="right" width="10%">广告名称：</td>
                            <td align="center" width="2%"><div class="star">*</div></td>
                            <td><input name="delivery_name" style="width:187px" class="input_cj left" value="11" id="delivery_name" type="text">

						  	<div style="position:absolute;left:500px;margin-top:13px">
                                 <div class="xl_tit" style="left:0px;cursor:pointer" id="ordertablelist"> <span class="left" id="selectordertable">1</span> <span><a href="javascript:"></a></span> </div>
								 <div id="ss" style="display:none">
								<table id="list_data" cellspacing="0" cellpadding="0" style="">  
									<thead>  
										<tr>  
											<th field="title" width="100">订单名称</th>  
											<th field="putdate" width="100">开始日期</th>  
											<th field="verifydate" width="100">结束日期</th>  
											<th field="usernameorder" width="100">广告客户</th>  
										</tr>  
									</thead>  
								</table> 
								</div>

								 <script>
									$('#ordertablelist').click(function(){
										 $('#list_data').datagrid({  
											title:'订单列表',  
											
											width: 700,  
											height: 3000,  
											nowrap: false,  
											striped: true,  
											border: true,  
											collapsible:false,//是否可折叠的  
											fit: true,//自动大小  
											url:'<{:U("dindanjson")}>',   
											loadMsg:'数据正在加载，请稍候...',
								
											remoteSort:false,   
											idField:'fldId',  
											singleSelect:true,//是否单选  
											pagination:true,//分页控件  
											rownumbers:true,//行号  
											frozenColumns:[[  
												{field:'ck',checkbox:true}  
											]],  
											
										});  
										 $('#ss').show();						
									})
								 
								 </script>
								 
                           </div>
						   
						    <div style="position:absolute;left:650px;margin-top:8px" class="blue">
							<span style="width:20px;white-space:nowrap; "><a href="#" id="delivery_create_order">新建</a></span>
							</div>
						    <div style="position:absolute;left:680px;margin-top:8px" class="blue">
						   <div class="statistic">
					             <div class="contextual_help" style=" left: 5px; *+left:-310px; _left:10px; top:-1px; _top:-14px; *+top:1px;">
								 <a href="#" onmouseout="closeHelp(2);" onmouseover="showHelp(2);"> </a>
								 <div id="key2" style="left: 20px; display: none;"> 
								      <p>订单是网站主与广告客户之间签订的广告投放协议。</p>
									  <p>选择广告所属订单，将能够在系统中按订单管理广告。</p>
									 
								 </div>
								 </div>
				            </div>
						   </div>

							<div id="checkdelivery_name" class="tips_error left" style="width:;display:none"></div>

							</td>
                         </tr>
                         <tr>
                           <td height="35" align="right">开始时间：</td>
                           <td align="center"><div class="star">*</div></td>
                           <td><input id="dds" type="text"></input>   
						   <script>
						   $('#dds').datebox({   
								required:true  
							});
						   </script>
						     



						     <select name="starttimeclock" class="select_1" style="width: 70px;" id="starttimeclock">
						        <option selected="selected" value="0">00:00</option>
								<option value="1">01:00</option>
								<option value="2">02:00</option>
								<option value="3">03:00</option>
								<option value="4">04:00</option>
								<option value="5">05:00</option>
								<option value="6">06:00</option>
								<option value="7">07:00</option>
								<option value="8">08:00</option>
								<option value="9">09:00</option>
								<option value="10">10:00</option>
								<option value="11">11:00</option>
								<option value="12">12:00</option>
								<option value="13">13:00</option>
								<option value="14">14:00</option>
								<option value="15">15:00</option>
								<option value="16">16:00</option>
								<option value="17">17:00</option>
								<option value="18">18:00</option>
								<option value="19">19:00</option>
								<option value="20">20:00</option>
								<option value="21">21:00</option>
								<option value="22">22:00</option>
								<option value="23">23:00</option>
                            </select><div id="calendarT" style="position:absolute;display:none;z-index:1000;top:168px; _top:224px; *+top:224px;  left:135px; *left:295px; _left:295px;width:323px"></div>
							</td>
                         </tr>
                         <tr>
                           <td height="35" align="right">结束时间：</td>
                           <td align="center"><div class="star">*</div></td>
                           <td>
						   <span id="notimelimit"><span>不限</span><span class="blue"><a href="javascript:" id="timeset">设定时间</a></span></span>
						   <span id="endtimeset" style="display:none">
							<span><input name="endtimedate" size="15" id="endtimedate" class="input_cj left" readonly="readonly" type="text"> </span>
							
							<span style="float:left"><select id="endtimeclock" class="select_1" name="endtimeclock" style="width: 70px; margin-left: 16px;">
								
								<option selected="selected" value="1">01:00</option>
								<option value="2">02:00</option>
								<option value="3">03:00</option>
								<option value="4">04:00</option>
								<option value="5">05:00</option>
								<option value="6">06:00</option>
								<option value="7">07:00</option>
								<option value="8">08:00</option>
								<option value="9">09:00</option>
								<option value="10">10:00</option>
								<option value="11">11:00</option>
								<option value="12">12:00</option>
								<option value="13">13:00</option>
								<option value="14">14:00</option>
								<option value="15">15:00</option>
								<option value="16">16:00</option>
								<option value="17">17:00</option>
								<option value="18">18:00</option>
								<option value="19">19:00</option>
								<option value="20">20:00</option>
								<option value="21">21:00</option>
								<option value="22">22:00</option>
								<option value="23">23:00</option>
								<option value="24">23:59</option>
								</select></span>
								<span class="blue" style="float:left;margin:6px 5px 0 0"><font id="settotaldays" color="#877687"> </font><a href="javascript:" id="notimeset">不限</a></span>
								<span class="select_5">
								 <ul class="blue">
								 <li><input id="week" name="autodays" value="week" type="radio"><label for="week">一星期</label></li>
								 <li><input id="month" name="autodays" value="month" type="radio"><label for="month">一个月</label></li>
								 <li><input id="3months" name="autodays" value="3months" type="radio"><label for="3months">三个月</label></li>
								 <li class="li2"><input id="years" name="autodays" value="years" type="radio"><label for="years">一年</label></li>
								 <li class="li2">|<a href="javascript:" id="jumptodatepick"> 不连续时间</a></li>
								 </ul></span><span id="checksubmittimeclock" class="tips_error" style="float:left;display:none;z-index:1000"></span>

								</span>
								 <div id="calendarTend" style="position:absolute;display:none;z-index:1000;top:280px; _top:280px; *+top:280px; left:295px; *left:295px; _left:295px;width:323px"></div>
							 </td>
                         </tr>
                       
                      
					
                  </tbody></table>
					
								<script>

$(function()
{$('#daymaxlimit').click(function(){$('#day_max2').show();$('#day_max1').hide();})
$('#daymaxnolimit').click(function(){$('#day_max1').show();$('#day_max2').hide();$('#day_max').val('');$('#checkdaymax').hide();$('#checkdaymax').html('');})
$("#day_max").keyup(function(){if(!$("#day_max2").is(":hidden"))
{var txt_len=$.trim($('#day_max').val()).length;if(txt_len!=0)
{var z=/^([1-9][0-9]*)$/　;if(!z.test($('#day_max').val()))
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');}
else if($('#day_max').val()>1000000000)
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');}
else
{$('#checkdaymax').hide();}}
else
{$('#checkdaymax').hide();}}})
jQuery("#search_cd1").keydown(function(e)
{if(e.keyCode==13)
{gridReload1();}});$("#from_material").click(function()
{session_timeout();jQuery("#slotgridTable1").trigger("reloadGrid");$('#slottable1').toggle();if(!materialshowstate)
{
var slotpath = $('#slotcodeinwhere').val();	
$("#slotgridTable1").jqGrid({datatype:"json",url:'?mo=delivery&fo=material_list_bigset&slotpath='+slotpath+'&ro=s&sid=61037&pid=89476&nd='+new Date().getTime(),height:320,colNames:["名称","尺寸","类型","预览"],colModel:[{name:'m_name',index:'m_name',width:245,sortable:false},{name:'m_size',index:'m_size',width:155,sortable:false,align:"center"},{name:'m_type',index:'m_size',sortable:false,width:137,align:"center"},{name:'preview',index:'preview',width:200,sortable:false,align:"center"}],sortname:'m_id',sortorder:'desc',viewrecords:true,rowNum:10,height:'auto',rowList:[10,15,20,25],multiselect:true,scrollrows:true,viewrecords:true,pager:"#slotgridPager1",gridComplete:function(){selectmaterialed();$('#cb_slotgridTable1').hide();$("#slotgridTable1 tr:nth-child(2n)").addClass('xxy');$('#slotgridTable1_cb').show();var gridTable_record=jQuery('#slotgridTable1').jqGrid('getGridParam','records');if(gridTable_record==0){$.ajax({type:'POST',url:'?mo=material&fo=material_to_buttom&ro=s&sid=61037&pid=89476',data:'date='+new Date(),success:function(msg)
{if(msg==0)
{$.ajax({type:'POST',url:'?mo=material&fo=material_buttom&ro=s&sid=61037&pid=89476',data:'date='+new Date(),success:function(msg)
{var materialoptionlist=msg.split('@');var materialcreatestate=false;for(var i=0;i<materialoptionlist.length;i++)
{if(materialoptionlist[i]=='material_create')
{materialcreatestate=true;}}
$('#slotgridTable1').append("<tr><td colspan='7' style='border-top: 1px solid #C4D5DD;'><div class='first_addd'>暂无数据</div></td></tr>");$('#slotgridTable1cnzzpagelist').append("<option>1/1</option>");$('#slotgridTable1_cb').hide();}});}else{$('#slotgridTable1').append("<tr><td colspan='7' style='border-top: 1px solid #C4D5DD;'><div class='first_addd' >暂无数据</div></td></tr>");$('#slotgridTable1cnzzpagelist').append("<option>1/1</option>");$('#slotgridTable1_cb').hide();}}});}}});jQuery("#slotgridTable1").jqGrid('navGrid','#gridPager1',{edit:false,add:false,del:false,search:false});jQuery("#slotgridTable1").navGrid('#slotgridPager1',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#slotgridPager1',{caption:"完成",onClickButton:function()
{submitbutton();},position:"frist"})
jQuery("#slotgridTable1").navGrid('#slotgridPager1',{edit:false,add:false,del:false,search:false,refresh:false}).navButtonAdd('#slotgridPager1',{caption:"取消",onClickButton:function()
{$('#slottable1').hide();},position:"second"})
materialshowstate=true;}});$('#search_cd1').focus(function(){var txt_value=$(this).val();if(txt_value==this.defaultValue){$(this).val("");$(this).addClass("ss_inp1");}});$('#search_cd1').blur(function(){var txt_value=$(this).val();if(txt_value==""){$(this).removeClass("ss_inp1");$(this).val(this.defaultValue);}});if($("#search_cd1").val()=='输入物料关键字'){$('#search_cd1').addClass("ss_inp");}});function gridReload1(msg)
{var material_change=msg;if(material_change==0||material_change==1){material_change='';}
var cd_mask1=jQuery("#search_cd1").val();slotpath = $('#slotcodeinwhere').val(); if(cd_mask1=='输入物料关键字')cd_mask1='';session_timeout();jQuery("#slotgridTable1").jqGrid('setGridParam',{url:"?mo=delivery&fo=material_list_bigset&slotpath="+slotpath+"&ro=s&sid=61037&pid=89476&cd_mask="+cd_mask1+"&material_change="+material_change,page:1}).trigger("reloadGrid");}
function addorientationoneul(key,value)
{if(!$('#divdw'+key+'list ul[id='+key+value+']').hasClass('li_bg_yell'))
{$('#divdw'+key+'list ul[id='+key+value+']').addClass('li_bg_yell');$('#divdw'+key+'list #li'+key+value+'').html('已添加');$('#divdw'+key+'list #li'+key+value+'').css("color","#FF9101");$('#divdw'+key+'list #li'+key+value+'').css("text-decoration","none");var selectorientation="<ul name='"+value+"' id='select"+value+"'><li class='w1'>"+value+"</li><li onclick=deleteselectorietnation('"+key+"','"+value+"') style='color: rgb(51, 119, 170); cursor: pointer; text-decoration: underline;' class='w2'> 删除</li></ul>";$('#dwori'+key+'row').append(selectorientation);}
$('#divdwnum'+key).html($('#dwori'+key+'row ul').size());}
function pullallorientaiton(key)
{$('#divdw'+key+'list ul').each(function(){addorientationoneul(key,$(this).attr('name'));})}
function deleteselectorietnation(key,value)
{$('#dwori'+key+'row #select'+value+'').remove();if($('#divdw'+key+'list ul[id='+key+value+']').hasClass('li_bg_yell'))
{$('#divdw'+key+'list ul[id='+key+value+']').removeClass('li_bg_yell');$('#divdw'+key+'list #li'+key+value+'').html('添加');$('#divdw'+key+'list #li'+key+value+'').css("color","#3377AA");$('#divdw'+key+'list #li'+key+value+'').css("text-decoration","underline");}
$('#divdwnum'+key).html($('#dwori'+key+'row ul').size());}
function deleteallorientation(key)
{$('#dwori'+key+'row ul').each(function(){deleteselectorietnation(key,$(this).attr('name'));})}
function submitorientation(key,name)
{if($('#dwori'+key+'row ul').size()!=0)
{var orientationstring="";orientationstring+=key+'@';var orientationli="<li>"+name+"=</li>";$('#dwori'+key+'row ul').each(function(){orientationstring+=$(this).attr('name')+'@';orientationli+="<li>"+$(this).attr('name')+"</li>";})
orientationli+="<li class='blue'><a href='#dingxiangtoufanglist' onclick=modifydelivery('"+key+"')>修改</a></li>";var orientationstringall=$('#orientationstringall').val();var orientationstringallist=orientationstringall.split('#');var orientstate=true;for(var i=0;i<orientationstringallist.length-1;i++)
{var orientationonearray=orientationstringallist[i].split('@');if(orientationonearray[0]==key)
{orientationstringallist[i]=orientationstring;orientstate=false;}}
if(orientstate)
{orientationstringall+=orientationstring+'#';}
else
{var orientationstring1='';for(var i=0;i<orientationstringallist.length-1;i++)
{orientationstring1+=orientationstringallist[i]+'#'}
orientationstringall=orientationstring1;}
$('#orientationstringall').val(orientationstringall);$('#'+key+'submit').remove();var ogstring="";ogstring+="<div id='"+key+"submit' style='display:' class='dxtf_tip'>";ogstring+=" <div class='dxtf_tip_tit'><span>"+name+"</span><a href=javascript:closedeliverydiv('"+key+"')></a></div>";ogstring+="<div class='dxtf_tip_con'>";ogstring+=" <ul id='"+key+"submitul'>";ogstring+=orientationli+"</ul>";ogstring+="</div><div class='clear'></div></div>";$('#orientationtablelistshow').append(ogstring);$('#delivery_put_all').hide();}}
function checkboxchange(){}
function nameadd(id)
{var num=$("#list  tr").length-2;if(num==0){$('#num_0').hide();$('#material_change').val('0');}if(num>=0){$('#unerror').hide();}
if(num>0){$('#lunhuan').show();}
if(num>9){$("#relation").show();return false;}else{var ret=jQuery("#slotgridTable1").jqGrid('getRowData',id);var class_type='';if(ret.m_type=='文字'){class_type='font_i';}if(ret.m_type=='图片'){class_type='pic_i';}if(ret.m_type=='Flash'){class_type='flash_i';}if(ret.m_type=='富媒体'){class_type='code_i';}if(ret.m_type=='创意库'){class_type='code_i';}if(ret.m_type=='焦点图'){class_type='code_i';}
var select2=$("#select2").val();if(select2==1){$('#list').append("<tr class='tr_white_tit' id=select"+id+" name="+id+" value="+id+"><td align='center'>&nbsp;</td><td id=select1"+id+" >"+ret.m_name+"</td><td id=select2"+id+"><div class='"+class_type+"'  >"+ret.m_type+"</div></td><td><div style='z-index:1000;'><select name='select3' id=select3"+id+"  class='select_1' style='width:60px;'><option value='1'>1</option><option  value='2'>2</option><option  value='3'>3</option><option  value='4'>4</option><option selected   value='5'>5</option><option   value='6'> 6</option><option  value='7'>7</option><option   value='8'>8</option><option   value='9'>9</option><option   value='10'>10</option></select></div></td><td class='blue'><a href='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id="+id+"' target='_blank' name='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id="+id+"' onclick='sendlogtoserver(139,2,-1,89476)'>预览</a><a href='javascript:'  onclick='sendlogtoserver(140,2,-1,89476),by_value("+id+");ex3a_modify_remove("+id+");'  id=ex3a_modifyTrigger_"+id+">修改</a><a href='javascript:' onclick=sendlogtoserver(141,2,-1,89476),deletename("+id+")>删除</a><a href='javascript:' onclick='sendlogtoserver(142,2,-1,89476),visual_preview("+id+")'>网站中预览</a>"+slotinhelp+"</td></tr>");ex3a_modify_bind(id);}else{$('#list').append("<tr class='tr_white_tit' id=select"+id+" name="+id+" value="+id+"><td align='center'>&nbsp;</td><td id=select1"+id+" >"+ret.m_name+"</td><td  id=select2"+id+"><div class='"+class_type+"'  >"+ret.m_type+"</div></td><td style='display:none;'><div style='z-index:1000;'><select name='select3' id=select3"+id+"  class='select_1' style='width:60px;'><option value='1'>1</option><option  value='2'>2</option><option  value='3'>3</option><option  value='4'>4</option><option selected   value='5'>5</option><option   value='6'> 6</option><option   value='7'>7</option><option   value='8'>8</option><option   value='9'>9</option><option   value='10'>10</option></select></div></td><td class='blue'><a href='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id="+id+"' name='?mo=material&fo=material_view&ro=s&sid=61037&pid=89476&id="+id+"' target='_blank' onclick='sendlogtoserver(139,2,-1,89476)'>预览</a><a href='javascript:'  onclick='sendlogtoserver(140,2,-1,89476),by_value("+id+");ex3a_modify_remove("+id+");' id=ex3a_modifyTrigger_"+id+">修改</a><a href='javascript:' onclick=sendlogtoserver(141,2,-1,89476),deletename("+id+")>删除</a><a href='javascript:' onclick='sendlogtoserver(142,2,-1,89476),visual_preview("+id+")'>网站中预览</a>"+slotinhelp+"</td></tr>");ex3a_modify_bind(id);}
var m_slot_size=$('#m_slot_size').val();if(m_slot_size!=''){setslotsize();}}}
function deletename(id)
{var del_material=confirm('确认删除这个物料？');if(del_material){var num=$("#list  tr").length-1;var select2=$('#select2').val();if(num==3&&select2==1){$('#num_0').hide();$('.tr_xl_tit').children(":eq(3)").hide();$('.tr_white_tit').each(function(){$(this).children(":eq(3)").hide();});$('#select2').val('0');$('#material_change').val('0');$('#str1').val('');}
if(num==3){gridReload1(0);$('#select2').val('0');}
if(num<12){$("#relation").hide();}
if(num==2){$('#num_0').show();$('#d_m_num').show();}
if(num>2){$('#lunhuan').show();}
if(num<4){$('#lunhuan').show();$('#show_falsh').hide();$('#flash_code_num').hide();$('#material_change').val('0');}
var id1=id+',';var m_id=$("#material_id").val();var zhi=m_id.replace(id1,'');$('#select'+id).remove();$('#weight'+id).remove();$("#material_id").val(zhi);if($('#list .flash_i').size()!='0'||$('#list .code_i').size()!='0'){$('#flash_code_num').show();deliverystate=false;}else{$('#flash_code_num').hide();}}else{return false;}}
function in_array(array,string1){var string1=string1;for(i=0;i<array.length;i++){if(string1==array[i]){return true;}}
return false;}
function submitbutton(){var zhi=$("#material_id").val();if(zhi!=''){var s='';var sno='';var ss='';var str_s=new Array();s=jQuery("#slotgridTable1").jqGrid('getGridParam','selarrrow');if(s==''){all=zhi;}else{var str1=zhi.split(',');str_s=s;var ma1_num="";if((str_s.length+str1.length)>10){ma1_num=10-str1.length+1;}
else{ma1_num=str_s.length;}
for(var j=0;j<ma1_num;j++){if(in_array(str1,str_s[j])==false){var s1=str_s[j]+',';ss+=s1;}}
var all=zhi+ss;}
$("#material_id").val(all);var m_id=$("#material_id").val();var str=m_id.split(',');if(str.length>=11){$('#relation').show();}else{$('#relation').hide();}
for(var i=0;i<str.length-1;i++){var sid=$("#select"+str[i]).attr('name');if(sid==str[i]&&sid!=''){$('#slottable1').hide();}else{if(str[i]==''){$('#slottable1').hide();}else{nameadd(str[i]);}}}}else{var s;var sno='';var ss='';var m_id=$("#material_id").val();var str=m_id.split(',');s=jQuery("#slotgridTable1").jqGrid('getGridParam','selarrrow');var ma2_num="";if((s.length+str.length)>10){ma2_num=10-str.length+1;}else{ma2_num=s.length;}
for(var m=0;m<ma2_num;m++){var ss1=s[m]+',';ss+=ss1;}
if(ss!=','){$("#material_id").val(ss);}
var m2_id=$("#material_id").val();var str=m2_id.split(',');if(str.length>11){$('#relation').show();}else{$('#relation').hide();}
for(var i=0;i<str.length-1;i++){var sid=$("#select"+str[i]).attr('name');if(sid==str[i]&&sid!=''){$('#slottable1').hide();}else{if(str[i]==''){$('#slottable1').hide();}else{nameadd(str[i]);}}}}
$('#slottable1').hide();setmolist();}
$(function(){var
flag=false;$('#select2').change(function() {
	if ($(this).val() == '1') {
		$('#show_falsh').hide();
		$('#flash_code_num').hide();
		$('.quanzhong').show();
	
		$('.tr_xl_tit').children(":eq(3)").show();
		$('.tr_white_tit').each(function() {
			$(this).children(":eq(3)").show();
		});
		flag = true;
		$('td[name=molist]').remove();
			$('#quanzhong').hide();
			$('div[name=mobilehelp]').css('right',757-$('#list tr[class=tr_white_tit]').find('td[class=blue]').position().left);
	}
	if ($(this).val() == '0') {
		$('#show_falsh').hide();
		$('#flash_code_num').hide();
		$('.tr_xl_tit').children(":eq(3)").hide();
		$('.tr_white_tit').each(function() {
			$(this).children(":eq(3)").hide();
		});
		flag = false;
		setmolist();
	}
	if ($(this).val() == '3') {
		$('#show_falsh').hide();
		$('#flash_code_num').hide();
		$('.tr_xl_tit').children(":eq(3)").hide();
		$('.tr_white_tit').each(function() {
			$(this).children(":eq(3)").hide();
		});
		flag = false;
		setmolist();
	}
	if ($(this).val() == '2') {
		$('#show_falsh').show();
		$('#time_a').show();
		if ($('#list .flash_i').size() != '0' || $('#list .code_i').size() != '0') {
			$('#flash_code_num').show();
			deliverystate = false;
		} else {
			$('#flash_code_num').hide();
		}
		$('.tr_xl_tit').children(":eq(3)").hide();
		$('.tr_white_tit').each(function() {
			$(this).children(":eq(3)").hide();
		});
		flag = false;
		setmolist();
	}
});})


function deliverysumbit(){var deliverystate=true;var selectorderid=$('#selectorderid').val();if(selectorderid=='')
{$('#checksubmitordername').show();$('#checksubmitordername').html('目标订单不能为空');deliverystate=false;}
var submitslotname=$('#submitslotname').val();if(submitslotname=='')
{$('#checksubmitslotname').show();$('#checksubmitslotname').html('目标广告位不能为空');deliverystate=false;}
var txt_len=$.trim($('#delivery_name').val()).length;if(txt_len==0)
{$('#checkdelivery_name').show();$('#checkdelivery_name').html('广告名称不能为空');deliverystate=false;}
else if(txt_len>100)
{$('#checkdelivery_name').show();$('#checkdelivery_name').html('广告名称超过最大限制100个字');deliverystate=false;}
else
{var delivery_name=$('#delivery_name').val().replace("&","(a)");delivery_name1=$('#delivery_name').val();var a=/select|insert|update|dalete|\'|\/\*|\.\.\/|union|into|load_file|outfile/;if(a.test(delivery_name))
{$("#checkdelivery_name").show();$("#checkdelivery_name").html('广告名格式有误');deliverystate=false;}
if(htmlspecialchars(delivery_name1)=='11')
{$('#checkdelivery_name').hide();$('#checkdelivery_name').html('');}
if(htmlspecialchars(delivery_name1)!=''&&htmlspecialchars(delivery_name1)!='11')
{$.ajax({type:'POST',url:'?mo=delivery&fo=delivery_checkname&ro=s&sid=61037&pid=89476',data:'delivery_name='+delivery_name+'&date='+new Date(),success:function(msg)
{if(msg.indexOf('guanli_session_timeout_list')!=-1)
{window.location.href='?mo=login&fo=login_timeout';}
else
{if(msg!=0)
{if(msg==-11)
{$("#checkdelivery_name").show();$("#checkdelivery_name").html('广告名格式有误');deliverystate=false;}
else
{$('#checkdelivery_name').show();$('#checkdelivery_name').html('广告名重复');deliverystate=false;}}
else if(msg==0)
{$('#checkdelivery_name').hide();$('#checkdelivery_name').html('');}}}});}}
var stattime=$('#starttimedate').val();var endtime=$('#endtimedate').val();if(endtime=='')
{endtime='9999-99-99';}
if(endtime<stattime){$('#checksubmittimeclock').show();$('#checksubmittimeclock').html('结束时间不能早于开始时间');deliverystate=false;}
if(endtime==stattime)
{if(parseInt($('#starttimeclock').val())>parseInt($('#endtimeclock').val()))
{$('#checksubmittimeclock').show();$('#checksubmittimeclock').html('结束时间不能早于开始时间');deliverystate=false;}}
var delivery_price=$('#delivery_price').val();var f=/^\d+(\.\d{1,2})?$/;var z=/^([1-9][0-9]*)$/　;var txt_len=$.trim(delivery_price).length;if(txt_len==0&&$('#price_mode').val()!='cpa')
{$('#checkdelivery_price').show();$('#checkdelivery_price').html('计费价格不能为空');deliverystate=false;}
if(!f.test(delivery_price)&&!z.test(delivery_price)&&$('#price_mode').val()!='cpa')
{$('#checkdelivery_price').show();$('#checkdelivery_price').html('请输入计费价格，最多两位小数');deliverystate=false;}
if(delivery_price>1000000)
{$('#checkdelivery_price').show();$('#checkdelivery_price').html('价格超过了最大值1000000');deliverystate=false;}
if(!$("#delivery_smailnum").is(":hidden"))
{if(!z.test($('#delivery_num').val()))
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');deliverystate=false;}
if($('#delivery_num').val()>1000000000)
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');deliverystate=false;}}
if(!$("#day_max2").is(":hidden"))
{var txt_len=$.trim($('#day_max').val()).length;if(txt_len!=0)
{var z=/^([1-9][0-9]*)$/　;if(!z.test($('#day_max').val()))
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');deliverystate=false;}
else if($('#day_max').val()>1000000000)
{$('#checkdaymax').show();$('#checkdaymax').html('填写1~10亿的整数');deliverystate=false;}
else
{}}
else
{}}
var submitalldelivery=$('#territorydengyu').val()+'#'+$('#datedengyu').val()+'#'+$('#timedengyu').val()+'#'+$('#Accessdengyu').val()+'#'+$('#browsertypedengyu').val()+'#'+$('#browserlanguagedengyu').val()+'#'+$('#optionsystemdengyu').val()+'#'+$('#Respectivelyratedengyu').val()+'#'+$('#domaindengyu').val()+'#￠'+$('#accessurldengyu').val();submitalldelivery=submitalldelivery.replace('其它','qita');submitalldelivery=submitalldelivery.replace('其它','qita');submitalldelivery=submitalldelivery.replace('其它','qita');submitalldelivery=submitalldelivery.replace('其它','qita');$('#submitalldelivery').val(submitalldelivery);var num=$("#list  tr").length-2;if(num==0){$("#unerror").show();$("#unerror").html("物料不能为空");deliverystate=false;}else{$("#unerror").hide();}
var material_change=$("#select2").val();if(material_change==2){var time=$("#time").val();if($('#list .flash_i').size()!='0'||$('#list .code_i').size()!='0'){$('#flash_code_num').show();deliverystate=false;}else{$('#flash_code_num').hide();}
if(!z.test(time)){$('#show_error').show();$('#show_error').html('请输入整数');deliverystate=false;}else{$('#show_error').hide();}}else{var time='';}
$("#material_time").val(time);var day=$("#day").val();var hour=$("#hour").val();var minute=$("#minute").val();var tou_num_ab=$('#tou_num_ab').val();if(tou_num_ab==1){
var pranyminu = $('#pranyminu').val();
if(!z.test(pranyminu)||pranyminu>59||pranyminu<1){
$("#show_error3").show();$("#show_error3").html('只允许输入1-59之间的整数');deliverystate=false;
}
else{
$("#show_error3").hide();
}


if(day!=''||hour!=''||minute!=''){if(day==''){day=0;}
if(hour==''){hour=0;}
if(minute==''){minute=0;}
var d_rate=day+','+hour+','+minute;}
if(day==''&&hour==''&&minute==''){var d_rate='';}
if(day==''){if(!$("#everyday").is(":hidden")){if(!z.test($('#day').val())){$("#one").hide();$('#everyday').show();$("#show_error1").show();$('#no_day_limit').hide();$("#show_error1").html('展现次数不能为空');deliverystate=false;}}}else{if(!$("#everyday").is(":hidden")){if(!z.test(day)){$('#show_error1').show();$("#show_error1").html("请填写1~1，000，000，000的整数");deliverystate=false;}else{if(day>1000000000){$('#show_error1').show();$("#show_error1").html('展示次数超过了最大限制1000000000');deliverystate=false;}else if(day==0){$('#show_error1').show();$("#show_error1").html('请填写1~1，000，000，000的整数');deliverystate=false;}else{$("#show_error1").hide();}}}}
if(hour==''){if(!$("#everyhour").is(":hidden")){if(!z.test($('#hour').val())){$("#two").hide();$('#everyhour').show();$("#show_error2").show();$('#no_hour_limit').hide();$("#show_error2").html('展现次数不能为空');deliverystate=false;}}}else{if(!z.test(hour)){$('#show_error2').show();$("#show_error2").html("请填写1~1，000，000，000的整数");deliverystate=false;}else if(hour==0){$('#show_error2').show();$("#show_error2").html('请填写1~1，000，000，000的整数');deliverystate=false;}else{if(hour>1000000000){$("#show_error2").show();$("#show_error2").html('展示次数超过了最大限制1000000000');deliverystate=false;}else{$("#show_error2").hide();}}}
if(minute==''){if(!$("#everyminute").is(":hidden")){if(!z.test($('#minute').val())){$("#three").hide();$('#everyminute').show();$("#show_error3").show();$('#no_minute_limit').hide();$("#show_error3").html('展现次数不能为空');deliverystate=false;}}}else{if(!z.test(minute)){$('#show_error3').show();$("#show_error3").html("请填写1~1，000，000，000的整数");deliverystate=false;}else if(minute==0){$('#show_error3').show();$("#show_error3").html('请填写1~1，000，000，000的整数');deliverystate=false;}else{if(minute>1000000000){$('#show_error3').show();$("#show_error3").html('展示次数超过了最大限制1000000000');deliverystate=false;}else{$("#show_error3").hide();}}}}
var material_id=$("#material_id").val();var str=material_id.split(',');var str1='';for(var i=0;i<str.length-1;i++){str1+=$("#select3"+str[i]+"").val()+",";}
$("#material_id").val(material_id);if(material_change==1){$("#str1").val(str1);}
$("#material_change").val(material_change);$("#d_rate").val(d_rate);if(!$("#checkdelivery_name").is(":hidden"))
{deliverystate=false;}
if(!$("#checksubmitslotname").is(":hidden"))
{deliverystate=false;}
var d_m_id=$('#d_m_id').val();var d_m_str=d_m_id.split(',');var exist="";for(var d_m=0;d_m<d_m_str.length;d_m++){for(var m_id=0;m_id<str.length-1;m_id++){if(d_m_str[d_m]==str[m_id]){exist+=str[m_id];}}}
if(exist!=""){deliverystate=false;$('#d_m_num').show();}else{$('#d_m_num').hide();}
if(!deliverystate)
{
 $("html,body").animate({scrollTop:-100},500);
return false;}

var 	_vhour_max = $('#per_hour_max').val(),
		per_hour_max_len = $.trim(_vhour_max).length; 
if (per_hour_max_len != 0 && _vhour_max!='0') {//如果填写了每小时展现，则需要判断填写是否正确
	var z = /^([1-9][0-9]*)$/　;
	if (!z.test(_vhour_max)) {
		$('#per_hour_max_error').html('填写1~10亿的整数').show();
		return false;
	} else if (_vhour_max > 1000000000) {
		$('#per_hour_max_error').html('填写1~10亿的整数').show();
		return false;
	} else {
		$('#per_hour_max_error').hide();
	}
}

$('#onsubmit').attr('src','images/onsubminover.gif');$('#onsubmit').attr('onclick','javascript:');var deliveryid=$('#deliveryid').val();var slotid=$('#submitslotname').val();var delivery_name=$('#delivery_name').val().replace("&","(a)");var starttimedate=$('#starttimedate').val();var starttimeclock=$('#starttimeclock').val();var endtimedate=$('#endtimedate').val();var endtimeclock=$('#endtimeclock').val();var priority_weight=$('#priority_weight').val();var charge_mode=$('#charge_mode').val();var price_mode=$('#price_mode').val();var delivery_price=$('#delivery_price').val();var delivery_num=$('#delivery_num').val();var material_id=$('#material_id').val();var day_max=$('#day_max').val();var per_hour_max=$('#per_hour_max').val();var str1=$('#str1').val();var material_change=$('#material_change').val();var material_time=$('#material_time').val();var d_rate=$('#d_rate').val();var selectorderid=$('#selectorderid').val();var submitalldelivery=$('#submitalldelivery').val();var pranyminu = $('#pranyminu').val();var orientationstringall=$('#orientationstringall').val();var priority_type=$('#priority_type').val();var adm_cnzz_token=$('#adm_cnzz_token').val();var iscopy = $('#iscopy').val();$.ajax({type:'POST',url:'?mo=delivery&fo=delivery_modify_add&ro=s&sid=61037&pid=89476',async:true,data:'deliveryid='+deliveryid+'&submitslotname='+slotid+'&delivery_name='+delivery_name+'&starttimedate='+starttimedate+'&starttimeclock='+starttimeclock+'&endtimedate='+endtimedate+'&endtimeclock='+endtimeclock+'&priority_weight='+priority_weight+'&charge_mode='+charge_mode+'&price_mode='+price_mode+'&day_max='+day_max+'&per_hour_max='+per_hour_max+'&delivery_price='+delivery_price+'&delivery_num='+delivery_num+'&material_id='+material_id+'&str1='+str1+'&material_change='+material_change+'&material_time='+material_time+'&d_rate='+d_rate+'&selectorderid='+selectorderid+'&submitalldelivery='+submitalldelivery+'&orientationstringall='+orientationstringall+'&pranyminu='+pranyminu+'&priority_type='+priority_type+'&adm_cnzz_token='+adm_cnzz_token+'&iscopy='+iscopy+'&date='+new Date(),success:function(msg)
{if(msg.indexOf('guanli_session_timeout_list')!=-1)
{window.location.href='?mo=login&fo=login_timeout';}
else if(msg.indexOf('nocooikelimit')!=-1)
{window.location.href='?mo=login&fo=login_no_limit';}
else if(msg.indexOf('toomuchad')!=-1)
{alert('广告位下广告过多');return false;}
else
{if(msg==1)
{$("#modifypic").center();$('#modifypic').fadeIn(100);setTimeout("window.location.href='index.php?s=/Adpush/insert?mo=delivery&fo=delivery_list&ro=s&sid=61037&pid=89476&cd_mask=&staus_mask=6&page=1&rows=15'",100);}}}})}

</script>
						<div style="display:none;margin-left:90px" class="tips_error left" id="checksubmitordername"></div>
					  <div class="jb_info mar_t20">广告物料</div>
					  <table id="list" class="mar_t10" style=" border:1px solid #d4e6f2; background-color:#fff;margin:20px 0 25px 0" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr class="tr_xl_tit">
                                         <td style="display:none" align="center" width="3%">&nbsp;</td>
                                         <td style="display:none" width="20%">物料名称</td>
                                          <td style="display:none" width="25%">类型</td>
                                         <td style="display:none" class="quanzhong" id="quanzhong" width="15%">权重</td>
                                          <td style="display:none" width="32%">操作</td>
                                       </tr>
									   <tr id="num_0" style="display:none;">
									      <td colspan="5" height="30"><div class="STYLE2" style="color:#999999;" align="left"><span class="star" style="margin-left:10px;margin-right:10px">*</span>请创建物料</div></td>
									  </tr>
                                                                        
                                                            <tr value="76400" name="76400" id="select76400" class="tr_white_tit">
                                                <td align="center">&nbsp;</td>
							   <td id="select176400">ffff</td><td id="select276400"><div class="pic_i">图片</div></td>
							      <td class="quanzhong" style="display:none"><div style="z-index: 1000;">
                                            <select style="width: 60px;" class="select_1" id="select376400" name="select3">
                                            <option value="1">1</option>
											<option value="2">2</option>
											<option value="3">3</option>
											<option value="4">4</option>
										    <option value="5" selected="selected">5</option>
											<option value="6">6</option>
											<option value="7">7</option>
											<option value="8">8</option>
											<option value="9">9</option>
											<option value="10">10</option>
									    </select>
                                           </div></td>
                                                     <td class="blue"><a target="_blank" href="###" name="?mo=material&amp;fo=material_view&amp;ro=s&amp;sid=61037&amp;pid=89476&amp;id=76400" onclick="sendlogtoserver(139,2,-1,89476)">预览</a><a href="javascript:" onclick="sendlogtoserver(140,2,-1,89476),by_value(76400);ex3a_modify_remove(76400);" id="ex3a_modifyTrigger_76400">修改</a><a onclick="sendlogtoserver(141,2,-1,89476),deletename(76400)" href="javascript:">删除</a>
													<a href="javascript:" onclick="sendlogtoserver(142,2,-1,89476),visual_preview(76400)">网站中预览</a><div class="statistic"><div class="contextual_help" name="mobilehelp" style="top: 6px; right: 331.3px;"><a href="#" onmouseout="closeHelp(541);" onmouseover="showHelp(541);"> </a><div id="key541" style="display: none;"> <p> 网站中预览，是指在网站中真实预览广告效果。一般应用于在广告发布前，提前查看广告效果。使用此功能，需要您：</p><p>【1】页面已部署了广告位代码。</p><p>【2】预览地址，请在“广告位-修改广告位”中设置广告位“所在网页URL”一项。</p></div></div></div>
                                                      </td>
                                                   </tr>
                                                                                									
                                         
                    </tbody></table>
                      <div class="tips_error left" id="relation" style="display:none;margin-left:0px;">最多关联10个物料</div>
					  <div class="tips_error left" id="flash_code_num" style="display:none;margin-left:0px;">幻灯片不能应用于Flash和富媒体类型的物料</div>
					  
                     <div class="tips_error left" id="d_m_num" style="display:none;margin-left:10px;">物料""处于删除状态，请将其在表中删除。</div>
					 <input value="" id="d_m_id" type="hidden">
					<div class="xzwl_box" style="clear:both;">
					         <div class="xzwl_tit"><a href="javascript:" id="from_material"></a></div>
						     <div class="cjxwl"><a href="#" id="ex3aTrigger" onclick="sendlogtoserver(136,2,-1,89476)"></a></div>
							  <div class="cykan"><a href="#" id="ex3aTriggercode" style="margin-left:8px" onclick="sendlogtoserver(143,2,-1,89476)"></a></div>
                              <div class="tips_error left" id="unerror" style="width:80px;display:none;"></div>
					</div>
                                    <div id="slottable1" style="display:none;">             
                                       <div style="width: 742px; margin-top: 0px; position: absolute; z-index: 877;" id="matialTablehead" class="xlmenu_top">
					   <span class="ff">广告物料</span><span class="right"><input style="width: 170px; margin-top: -14px;" class="ss_inp" id="search_cd1" value="输入物料关键字" type="text">
		                     <img style="cursor: pointer; margin-top: 5px;" onclick="gridReload1();" src="../Public/images/search.gif"></span>
				   </div><br><br>
			                       <div id="table">
	                             	               <table id="slotgridTable1"></table>
                                                </div>
                                              <div id="slotgridPager1"></div> 
                               </div>
					<table class="mar_t10" style="margin-top:18px" border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tbody><tr id="lunhuan" style="display:;">
                          <td height="35" align="left" width="10.5%"><div style="padding-left:14px">轮播方式：</div></td>
                           <td width="26%">
							 <select name="select2" class="select_1" style="width:80px;" id="select2">
									<option value="0" id="even" onclick="gridReload1(0);" selected="selected">均匀</option>
									<option value="3" id="order" onclick="gridReload1(3);">顺序</option>
									<option value="1" id="head_weight" onclick="gridReload1(1);">手动权重</option>
									<option value="2" id="flash" onclick="gridReload1(2);">幻灯片</option>
									
							  </select>
                          <div class="statistic">
					             <div class="contextual_help" style=" right: 99px; top:4px; _top:-16px; *+top:-18px;">
								 <a href="#" onmouseout="closeHelp(1);" onmouseover="showHelp(1);"> </a>
								 <div id="key1" style="display: none;"> 
								      <p>均匀：物料具有均等的展现机率，每刷新一次页面显示其中一个物料。</p>
									   <p>顺序：物料按顺序依次展现，每刷新一次页面显示一个物料。</p>
									  <p>手动权重：与“均匀”的机制相同，权重大的物料展现机率越高。</p>
									  <p>幻灯片：多个物料将同时加载，并以幻灯片形式顺序播放。</p>
								 </div>
								 </div>
					         </div></td>
                           <td width="59%"></td>
                         </tr>
						 
                              <tr id="show_falsh" style="display:none;">
                                     <td></td>
                                     <td colspan="2" id="time_a"><span class="left">轮换时间间隔<input value="0" size="10" id="time" type="text">秒</span><div style="width: 60px;display:none;" class="tips_error left" id="show_error"></div></td>
                             </tr>
							
                        
<script>

     $(function(){
	 
	  $('#deliverynumlimit').click(function(){
			if($(this).attr('src').indexOf('up')!=-1){
				$('#deliverynumlimitdiv').show();
				$(this).attr('src',"../Public/images/down2.gif");
			}
			else if($(this).attr('src').indexOf('down')!=-1){
				$('#deliverynumlimitdiv').hide();
				$(this).attr('src',"../Public/images/up.gif");
			}
	   
	   
	   })
	   
	     $('#setpricelimit').click(function(){
			if($(this).attr('src').indexOf('up')!=-1){
				$('#setpricelimittable').show();
				$(this).attr('src',"../Public/images/down2.gif");
			}
			else if($(this).attr('src').indexOf('down')!=-1){
				$('#setpricelimittable').hide();
				$(this).attr('src',"../Public/images/up.gif");
			}
	   
	   
	   })
	 
	 
	 

 var   r   =   /^[0-9]*[0-9][0-9]*$/　;//正整数
 $("#tou_num").click(function(){
 var  tou_num2 = $("#tou_num2").val();
 if(tou_num2 == 0){
     $("#show").show();
	 $("#show1").show();
     $('#tou_num').hide();
	 $('#tou_num1').show();
     $('#tou_num_a').hide();
	 $('#tou_num_b').show();
	 $('#tou_num_ab').val('1'); 
 }
      });

 $("#tou_num1").click(function(){
 var  tou_num3 = $("#tou_num3").val();
 if(tou_num3 == 1){
     $("#show").hide();
	 $('#tou_num1').hide();
	 $('#tou_num').show();
	 $('#tou_num_b').hide();
	 $('#tou_num_a').show();
	 $('#tou_num_ab').val('0');
	 $('#d_rate').val('');
 }
      });

//判断设置每位用户的展现次数
      $("#one").click(function(){
			$("#everyday").show();
			$('#no_day_limit').hide();
			$("#one").hide();
			$('#day').val('');
	  });
	    $("#two").click(function(){
			$("#everyhour").show();
			$('#no_hour_limit').hide();
			$("#two").hide();
			$('#hour').val('');
	  });
	   $("#three").click(function(){
			$("#everyminute").show();
			$('#no_minute_limit').hide();
			$("#show_error3").hide();
			
			$("#three").hide();
			$('#minute').val('');
	  });
      $("#noone").click(function(){
			$("#everyday").hide();
			$('#no_day_limit').show();
			$('#show_error1').hide();
			$("#one").show();
			$('#day').val('');
	  });
       $("#notwo").click(function(){
			$("#everyhour").hide();
			$('#no_hour_limit').show();
			$('#show_error2').hide();
			$("#two").show();
			$('#hour').val('');
	  });
	   $("#nothree").click(function(){
			$("#everyminute").hide();
			$('#no_minute_limit').show();
			$('#show_error3').hide();
			$("#three").show();
			$('#minute').val('');
	  });
	    var  z=/^([1-9][0-9]*)$/　;//正整数：
	   $("#time").blur(function(){
	     var show_time = $('#time').val();
		 if(!z.test(show_time)){
				 $('#show_error').show();
				 $('#show_error').html('请输入整数');
				 deliverystate=  false;
			 }else{
				$('#show_error').hide();
			 }
	   
	   })
	   
       $("#day").blur(function(){
	          var day = $("#day").val();
			  var day_len = $.trim(day).length;
			  if(day == '' || !day_len){
			            $('#show_error1').show();
				        $("#show_error1").html("展现次数不能为空");
						return false;
			  }
			  if(day !='' || day_len){
			       if(!r.test(day)){
				         $('#show_error1').show();
				        $("#show_error1").html("请填写1~1，000，000，000的整数");
						return false;  
				   }else{
						if(day>1000000000){
						    $('#show_error1').show();
							$("#show_error1").html('展示次数超过了最大限制1000000000');
							return false;
						}else if(day == 0){
							$('#show_error1').show();
							$("#show_error1").html('请填写1~1，000，000，000的整数');
							return false;			    
						}else{
                           $("#show_error1").hide();
                         }
					}
			  }
	   });
	   $("#hour").blur(function(){
	             var hour = $("#hour").val();
				var hour_len = $.trim(hour).length;
			    if(hour == '' || !hour_len){
			            $('#show_error2').show();
				        $("#show_error2").html("展现次数不能为空");
						return false;
			   }
			  if(hour !=''){
			    if(!r.test(hour)){
				         $('#show_error2').show();
				         $("#show_error2").html("请填写1~1，000，000，000的整数");
						return false;  
				   }else if(hour == 0){
							$('#show_error2').show();
							$("#show_error2").html('请填写1~1，000，000，000的整数');
							return false;			    
				  }else{
						if(hour>1000000000){
							$("#show_error2").show();
							$("#show_error2").html('展示次数超过了最大限制1000000000');
							return false;
						}else{
                             $("#show_error2").hide();
                        }
                 } 
			  }
	   });
	   $("#minute").blur(function(){
	           var minute = $("#minute").val();
			   	var minute_len = $.trim(minute).length;
			    if(minute == '' || !minute_len){
			            $('#show_error3').show();
				        $("#show_error3").html("展现次数不能为空");
						return false;
			   }
			  if(minute !=''){
			   if(!r.test(minute)){
			             $('#show_error3').show();
				        $("#show_error3").html("请填写1~1，000，000，000的整数");
						return false;  
				   }else if(minute == 0){
							$('#show_error3').show();
							$("#show_error3").html('请填写1~1，000，000，000的整数');
							return false;			    
				}else{
						if(minute>1000000000){
						    $('#show_error3').show();
							$("#show_error3").html('展示次数超过了最大限制1000000000');
							return false;
						}else{
                              $("#show_error3").hide();
                       }
					}
			  }
	   });

   });
</script>
		
                  </tbody></table>        
				  <div class="jb_info mar_t20">投放选项</div>
				  <div id="orientationtablelistshow">
				  <div class="dxtf_tip" style="display:none" id="territorysubmit">
				        <div class="dxtf_tip_tit"><span>地域</span><a href="javascript:closedeliverydiv('territory')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="territorysubmitul">
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				   <div class="dxtf_tip" style="display:none" id="browsertypesubmit">
				        <div class="dxtf_tip_tit"><span>浏览器类型</span><a href="javascript:closedeliverydiv('browsertype')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="browsertypesubmitul">
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				     <div class="dxtf_tip" style="display:none" id="browserlanguagesubmit">
				        <div class="dxtf_tip_tit"><span>浏览器语言</span><a href="javascript:closedeliverydiv('browserlanguage')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="browserlanguagesubmitul">
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				  
				    <div class="dxtf_tip" style="display:none" id="optionsystemsubmit">
				        <div class="dxtf_tip_tit"><span>操作系统</span><a href="javascript:closedeliverydiv('optionsystem')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="optionsystemsubmitul">
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				  
				  <div class="dxtf_tip" style="display:none" id="Respectivelyratesubmit">
				        <div class="dxtf_tip_tit"><span>分辨率</span><a href="javascript:closedeliverydiv('Respectivelyrate')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="Respectivelyratesubmitul">
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				  <div class="dxtf_tip" style="display:none" id="Accesssubmit">
				        <div class="dxtf_tip_tit"><span>接入方式</span><a href="javascript:closedeliverydiv('Access')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="Accesssubmitul">
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				   <div class="dxtf_tip" style="display:none" id="datesubmit">
				        <div class="dxtf_tip_tit"><span>日期</span><a href="javascript:closedeliverydiv('date')"></a></div>
						<div class="dxtf_tip_con">
						      <ul id="datesubmitul"> 
							  </ul>
						</div>
						<div class="clear"></div>
				  </div>
				  <div class="dxtf_tip" style="display:none" id="timesubmit">
				        <div class="dxtf_tip_tit"><span>时间</span><a href="javascript:closedeliverydiv('time')"></a></div>
						<div class="dxtf_tip_con" id="timesubmitdiv"> 
						</div>
						<div class="clear"></div>
				  </div>
				   <div class="dxtf_tip" style="display:none" id="accessurlsubmit">
				        <div class="dxtf_tip_tit"><span>受访url</span><a href="javascript:closedeliverydiv('accessurl')"></a></div>
						    <div class="dxtf_tip_con">
						      <ul id="accessurlsubmitul">
							  </ul>
						</div> 
						<div class="clear"></div>
				  </div>
				  <div class="dxtf_tip" style="display:none" id="domainsubmit">
				        <div class="dxtf_tip_tit"><span>来路域名：</span><a href="javascript:closedeliverydiv('domain')"></a></div>
						
						    <div class="dxtf_tip_con">
						      <ul id="domainsubmitul">
							  </ul>
						</div> 
						<div class="clear"></div>
				  </div>
				    </div>
					 <div style="float:left;margin-top:12px;padding-left:15px" class="xzwl_box">广告定向：</div>
				  <div class="xzwl_box" style="width:105px;float:left;margin-left:15px;margin-top:5px">
					      <div class="dxtf_tit"><a href="javascript:" id="delivery_put"></a> </div>
						  <div class="statistic">
									 <div class="contextual_help" style="top:-19px;_top:-19px;*+top:-19px">
									 <a onmouseover="showHelp(30);" onmouseout="closeHelp(30);" href="#"> </a>
									 <div style="display: none;" id="key30"> 
										<p>定向投放是广告投放策略中的精准投放方式，您可以向不同的目标人群投放不同的广告，当目标人群符合指定的定向特征时，才显示广告。</p>
									 </div>
									 </div>
								 </div>
				  </div>
					
				  	  <div class="clear"></div>
				
				  <div id="delivery_put_all" style="display: none;">
				  <div class="xlmenu_top put_bg">
						<span class="ff left" style="_padding-top:5px;">定位：
						<select name="dwselect" id="dwselect" class="select_1" style="width:100px;">
							<option selected="selected" value="dwterritory">地域</option>
							<option value="dwdate">日期</option>
							<option value="dwtime">时间</option>
							<option value="dwAccess">接入方式</option>
							<option value="dwbrowsertype">浏览器类型</option>
							<option value="dwbrowserlanguage">浏览器语言</option>
							<option value="dwoptionsystem">操作系统</option>
							<option value="dwRespectivelyrate">分辨率</option>
							<option value="dwdomain">来路域名</option>
							<option value="dwaccessurl">受访URL</option>
							<option value="dwpserid">车系</option><option value="dw12">我的频道</option>
                        </select>
						<select name="dwdengyu" class="select_1" id="dwdengyu" style="width:70px;">
						<option selected="selected" value="1">等于</option>
						<option value="0">不等于</option>

                        </select>
					  </span>	
					<span class="blue" style="float:right"><a href="###">自定义定向</a></span>					  
				</div>	
				<div id="dingxiangtoufanglist" name="dingxiangtoufanglist">
				  <div class="fix_area" style=" display:;" id="divdwterritory">
				  <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr>
                                         <td colspan="4">
									         									 </td>
                                       </tr>
                                       <tr class="tr_xl_tit f_b">
                                         <td width="22%">省／市</td>
                                          <td class="border_l blue" width="40%"><a href="javascript:addallarea();">全部添加</a></td>
                                          <td width="20%">已选地理位置</td>
                                          <td class="border_l" width="18%"><div class="blue"><a href="javascript:deleteallarea()">全部删除</a></div></td>
                                       </tr>
                                       <tr class="tr_white_tit bg_lanse">
                                         <td colspan="4">
										      <div class="dw_l" id="areadiv"><ul><li><input value="0" name="北京市" id="inputprovince0" type="checkbox"><label id="province0">北京市</label></li><li><input value="1" name="上海市" id="inputprovince1" type="checkbox"><label id="province1">上海市</label></li><li><input value="2" name="天津市" id="inputprovince2" type="checkbox"><label id="province2">天津市</label></li><li><input value="3" name="重庆市" id="inputprovince3" type="checkbox"><label id="province3">重庆市</label></li></ul><ul><li><input value="4" name="河北省" id="inputprovince4" type="checkbox"><label id="province4">河北省</label></li><li><input value="5" name="山西省" id="inputprovince5" type="checkbox"><label id="province5">山西省</label></li><li><input value="6" name="内蒙古" id="inputprovince6" type="checkbox"><label id="province6">内蒙古</label></li><li><input value="7" name="辽宁省" id="inputprovince7" type="checkbox"><label id="province7">辽宁省</label></li></ul><ul><li><input value="8" name="吉林省" id="inputprovince8" type="checkbox"><label id="province8">吉林省</label></li><li><input value="9" name="黑龙江" id="inputprovince9" type="checkbox"><label id="province9">黑龙江</label></li><li><input value="10" name="江苏省" id="inputprovince10" type="checkbox"><label id="province10">江苏省</label></li><li><input value="11" name="浙江省" id="inputprovince11" type="checkbox"><label id="province11">浙江省</label></li></ul><ul><li><input value="12" name="安徽省" id="inputprovince12" type="checkbox"><label id="province12">安徽省</label></li><li><input value="13" name="福建省" id="inputprovince13" type="checkbox"><label id="province13">福建省</label></li><li><input value="14" name="江西省" id="inputprovince14" type="checkbox"><label id="province14">江西省</label></li><li><input value="15" name="山东省" id="inputprovince15" type="checkbox"><label id="province15">山东省</label></li></ul><ul><li><input value="16" name="河南省" id="inputprovince16" type="checkbox"><label id="province16">河南省</label></li><li><input value="17" name="湖北省" id="inputprovince17" type="checkbox"><label id="province17">湖北省</label></li><li><input value="18" name="湖南省" id="inputprovince18" type="checkbox"><label id="province18">湖南省</label></li><li><input value="19" name="广东省" id="inputprovince19" type="checkbox"><label id="province19">广东省</label></li></ul><ul><li><input value="20" name="广西省" id="inputprovince20" type="checkbox"><label id="province20">广西省</label></li><li><input value="21" name="海南省" id="inputprovince21" type="checkbox"><label id="province21">海南省</label></li><li><input value="22" name="四川省" id="inputprovince22" type="checkbox"><label id="province22">四川省</label></li><li><input value="23" name="贵州省" id="inputprovince23" type="checkbox"><label id="province23">贵州省</label></li></ul><ul><li><input value="24" name="云南省" id="inputprovince24" type="checkbox"><label id="province24">云南省</label></li><li><input value="25" name="西藏省" id="inputprovince25" type="checkbox"><label id="province25">西藏省</label></li><li><input value="26" name="陕西省" id="inputprovince26" type="checkbox"><label id="province26">陕西省</label></li><li><input value="27" name="甘肃省" id="inputprovince27" type="checkbox"><label id="province27">甘肃省</label></li></ul><ul><li><input value="28" name="青海省" id="inputprovince28" type="checkbox"><label id="province28">青海省</label></li><li><input value="29" name="宁夏省" id="inputprovince29" type="checkbox"><label id="province29">宁夏省</label></li><li><input value="30" name="新疆省" id="inputprovince30" type="checkbox"><label id="province30">新疆省</label></li><li><input value="31" name="台湾省" id="inputprovince31" type="checkbox"><label id="province31">台湾省</label></li></ul><ul><li><input value="32" name="香港" id="inputprovince32" type="checkbox"><label id="province32">香港</label></li><li><input value="33" name="澳门" id="inputprovince33" type="checkbox"><label id="province33">澳门</label></li><li><input value="34" name="国外" id="inputprovince34" type="checkbox"><label id="province34">国外</label></li><li><input value="35" name="其他" id="inputprovince35" type="checkbox"><label id="province35">其他</label></li></ul></div>
											 
											  <div class="dw_r">
											        <div class="r_b blue" id="selectareaid">	 
													</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="4">
										 <div class="left">　<img src="../Public/images/over_x.gif" id="submitterritoryimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>
					                     </td>
									   </tr>		   
                    </tbody></table>
				  </div>
					<div class="fix_time" style=" display:none;" id="divdwtime">
				    <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                      
                                       <tbody><tr class="tr_white_tit">
                                         <td style="padding:10px;">
										      <div class="data_tit"><span class="left blue"><a href="javascript:" id="checkalldate">所有日期</a>|<a href="javascript:" id="checkworkdate">工作日</a>|<a href="javascript:" id="checkrelexdate">周末</a></span><span class="right">每周　共投放 <span class="f12_y" id="totalday">0</span> 小时</span></div>
										      <table class="mar_t10" style=" border:1px solid #d4e6f2; background-color:#fff;" id="tt" border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <tbody><tr>
                                                  <td width="12%"><div class="data_time"></div></td>
                                                  <td class="border_l" width="22%">00:00～5:00</td>
                                                  <td width="22%">6:00～11:00</td>
                                                  <td width="22%">12:00～17:00</td>
                                                  <td width="22%">18:00～23:00</td>
                                                </tr>
                                                <tr>
                                                  <td valign="top">
												       <div class="day_7">
													        <ul>
															     <li>　</li>
								<li><input name="allMonday" value="" type="checkbox"> <a href="javascript:;" name="Monday">星期一</a></li>		
								<li><input name="allTuesday" value="" type="checkbox"> <a href="javascript:;" name="Tuesday">星期二</a></li>
								<li><input name="allWednesday" value="" type="checkbox"> <a href="javascript:;" name="Wednesday">星期三</a></li>
								<li><input name="allThursday" value="" type="checkbox"> <a href="javascript:;" name="Thursday">星期四</a></li>
								<li><input name="allFriday" value="" type="checkbox"> <a href="javascript:;" name="Friday">星期五</a></li>
								<li><input name="allSaturday" value="" type="checkbox"> <a href="javascript:;" name="Saturday">星期六</a></li>
								<li><input name="allSunday" value="" type="checkbox"> <a href="javascript:;" name="Sunday">星期日</a></li>
															</ul>
												    </div>												  </td>
                                                  <td style="padding:0px; border-left:1px solid #d3e7f2;" valign="top">
												  <div class="time_five">
                                                    <ul>
                                                      <li><a href="javascript:;" name="time0">0</a></li>
                                                      <li><a href="javascript:;" name="time1">1</a></li>
                                                      <li><a href="javascript:;" name="time2">2</a></li>
                                                      <li><a href="javascript:;" name="time3">3</a></li>
                                                      <li><a href="javascript:;" name="time4">4</a></li>
                                                      <li><a href="javascript:;" name="time5">5</a></li>
                                                    </ul>
                                                  </div>
                                                   <div class="more_input">
												         <ul>
												<li id="liMonday_time0"><input name="rights[]" value="Monday_time0" id="Monday_time0" type="checkbox"></li>
												<li id="liMonday_time1"><input name="rights[]" value="Monday_time1" id="Monday_time1" type="checkbox"></li>
												<li id="liMonday_time2"><input name="rights[]" value="Monday_time2" id="Monday_time2" type="checkbox"></li>
												<li id="liMonday_time3"><input name="rights[]" value="Monday_time3" id="Monday_time3" type="checkbox"></li>
												<li id="liMonday_time4"><input name="rights[]" value="Monday_time4" id="Monday_time4" type="checkbox"></li>
												<li id="liMonday_time5"><input name="rights[]" value="Monday_time5" id="Monday_time5" type="checkbox"></li>
														  
												<li id="liTuesday_time0"><input name="rights[]" value="Tuesday_time0" id="Tuesday_time0" type="checkbox"></li>
												<li id="liTuesday_time1"><input name="rights[]" value="Tuesday_time1" id="Tuesday_time1" type="checkbox"></li>
												<li id="liTuesday_time2"><input name="rights[]" value="Tuesday_time2" id="Tuesday_time2" type="checkbox"></li>
												<li id="liTuesday_time3"><input name="rights[]" value="Tuesday_time3" id="Tuesday_time3" type="checkbox"></li>
												<li id="liTuesday_time4"><input name="rights[]" value="Tuesday_time4" id="Tuesday_time4" type="checkbox"></li>
												<li id="liTuesday_time5"><input name="rights[]" value="Tuesday_time5" id="Tuesday_time5" type="checkbox"></li>
														  
											<li id="liWednesday_time0"><input name="rights[]" value="Wednesday_time0" id="Wednesday_time0" type="checkbox"></li>
											<li id="liWednesday_time1"><input name="rights[]" value="Wednesday_time1" id="Wednesday_time1" type="checkbox"></li>
											<li id="liWednesday_time2"><input name="rights[]" value="Wednesday_time2" id="Wednesday_time2" type="checkbox"></li>
											<li id="liWednesday_time3"><input name="rights[]" value="Wednesday_time3" id="Wednesday_time3" type="checkbox"></li>
											<li id="liWednesday_time4"><input name="rights[]" value="Wednesday_time4" id="Wednesday_time4" type="checkbox"></li>
											<li id="liWednesday_time5"><input name="rights[]" value="Wednesday_time5" id="Wednesday_time5" type="checkbox"></li>
															
												<li id="liThursday_time0"><input name="rights[]" value="Thursday_time0" id="Thursday_time0" type="checkbox"></li>
												<li id="liThursday_time1"><input name="rights[]" value="Thursday_time1" id="Thursday_time1" type="checkbox"></li>
												<li id="liThursday_time2"><input name="rights[]" value="Thursday_time2" id="Thursday_time2" type="checkbox"></li>
												<li id="liThursday_time3"><input name="rights[]" value="Thursday_time3" id="Thursday_time3" type="checkbox"></li>
												<li id="liThursday_time4"><input name="rights[]" value="Thursday_time4" id="Thursday_time4" type="checkbox"></li>
												<li id="liThursday_time5"><input name="rights[]" value="Thursday_time5" id="Thursday_time5" type="checkbox"></li>
														
													<li id="liFriday_time0"><input name="rights[]" value="Friday_time0" id="Friday_time0" type="checkbox"></li>
													<li id="liFriday_time1"><input name="rights[]" value="Friday_time1" id="Friday_time1" type="checkbox"></li>
												    <li id="liFriday_time2"><input name="rights[]" value="Friday_time2" id="Friday_time2" type="checkbox"></li>
													<li id="liFriday_time3"><input name="rights[]" value="Friday_time3" id="Friday_time3" type="checkbox"></li>
													<li id="liFriday_time4"><input name="rights[]" value="Friday_time4" id="Friday_time4" type="checkbox"></li>
													<li id="liFriday_time5"><input name="rights[]" value="Friday_time5" id="Friday_time5" type="checkbox"></li>
														
												<li id="liSaturday_time0"><input name="rights[]" value="Saturday_time0" id="Saturday_time0" type="checkbox"></li>
												<li id="liSaturday_time1"><input name="rights[]" value="Saturday_time1" id="Saturday_time1" type="checkbox"></li>
												<li id="liSaturday_time2"><input name="rights[]" value="Saturday_time2" id="Saturday_time2" type="checkbox"></li>
												<li id="liSaturday_time3"><input name="rights[]" value="Saturday_time3" id="Saturday_time3" type="checkbox"></li>
											    <li id="liSaturday_time4"><input name="rights[]" value="Saturday_time4" id="Saturday_time4" type="checkbox"></li>
												<li id="liSaturday_time5"><input name="rights[]" value="Saturday_time5" id="Saturday_time5" type="checkbox"></li>
														
												      <li id="liSunday_time0"><input name="rights[]" value="Sunday_time0" id="Sunday_time0" type="checkbox"></li>
													  <li id="liSunday_time1"><input name="rights[]" value="Sunday_time1" id="Sunday_time1" type="checkbox"></li>
													  <li id="liSunday_time2"><input name="rights[]" value="Sunday_time2" id="Sunday_time2" type="checkbox"></li>
													  <li id="liSunday_time3"><input name="rights[]" value="Sunday_time3" id="Sunday_time3" type="checkbox"></li>
													  <li id="liSunday_time4"><input name="rights[]" value="Sunday_time4" id="Sunday_time4" type="checkbox"></li>
													  <li id="liSunday_time5"><input name="rights[]" value="Sunday_time5" id="Sunday_time5" type="checkbox"></li>
												       </ul>
												    </div>												  </td>
                                                  <td style="padding:0px;" valign="top">
												  <div class="time_five">
                                                    <ul>
                                                     <li><a href="javascript:;" name="time6">6</a></li>
                                                      <li><a href="javascript:;" name="time7">7</a></li>
                                                      <li><a href="javascript:;" name="time8">8</a></li>
                                                      <li><a href="javascript:;" name="time9">9</a></li>
                                                      <li><a href="javascript:;" name="time-10">10</a></li>
                                                      <li><a href="javascript:;" name="time-11">11</a></li>
                                                    </ul>
                                                  </div>
                                                   <div class="more_input">
												         <ul>
											   <li id="liMonday_time6"><input name="rights[]" value="Monday_time6" id="Monday_time6" type="checkbox"></li>
												<li id="liMonday_time7"><input name="rights[]" value="Monday_time7" id="Monday_time7" type="checkbox"></li>
												<li id="liMonday_time8"><input name="rights[]" value="Monday_time8" id="Monday_time8" type="checkbox"></li>
												<li id="liMonday_time9"><input name="rights[]" value="Monday_time9" id="Monday_time9" type="checkbox"></li>
												<li id="liMonday_time-10"><input name="rights[]" value="Monday_time10" id="Monday_time-10" type="checkbox"></li>
												<li id="liMonday_time-11"><input name="rights[]" value="Monday_time11" id="Monday_time-11" type="checkbox"></li>
														  
												<li id="liTuesday_time6"><input name="rights[]" value="Tuesday_time6" id="Tuesday_time6" type="checkbox"></li>
												<li id="liTuesday_time7"><input name="rights[]" value="Tuesday_time7" id="Tuesday_time7" type="checkbox"></li>
												<li id="liTuesday_time8"><input name="rights[]" value="Tuesday_time8" id="Tuesday_time8" type="checkbox"></li>
												<li id="liTuesday_time9"><input name="rights[]" value="Tuesday_time9" id="Tuesday_time9" type="checkbox"></li>
												<li id="liTuesday_time-10"><input name="rights[]" value="Tuesday_time10" id="Tuesday_time-10" type="checkbox"></li>
												<li id="liTuesday_time-11"><input name="rights[]" value="Tuesday_time11" id="Tuesday_time-11" type="checkbox"></li>
														  
											<li id="liWednesday_time6"><input name="rights[]" value="Wednesday_time6" id="Wednesday_time6" type="checkbox"></li>
											<li id="liWednesday_time7"><input name="rights[]" value="Wednesday_time7" id="Wednesday_time7" type="checkbox"></li>
											<li id="liWednesday_time8"><input name="rights[]" value="Wednesday_time8" id="Wednesday_time8" type="checkbox"></li>
											<li id="liWednesday_time9"><input name="rights[]" value="Wednesday_time9" id="Wednesday_time9" type="checkbox"></li>
											<li id="liWednesday_time-10"><input name="rights[]" value="Wednesday_time10" id="Wednesday_time-10" type="checkbox"></li>
											<li id="liWednesday_time-11"><input name="rights[]" value="Wednesday_time11" id="Wednesday_time-11" type="checkbox"></li>
															
												<li id="liThursday_time6"><input name="rights[]" value="Thursday_time6" id="Thursday_time6" type="checkbox"></li>
												<li id="liThursday_time7"><input name="rights[]" value="Thursday_time7" id="Thursday_time7" type="checkbox"></li>
												<li id="liThursday_time8"><input name="rights[]" value="Thursday_time8" id="Thursday_time8" type="checkbox"></li>
												<li id="liThursday_time9"><input name="rights[]" value="Thursday_time9" id="Thursday_time9" type="checkbox"></li>
												<li id="liThursday_time-10"><input name="rights[]" value="Thursday_time10" id="Thursday_time-10" type="checkbox"></li>
												<li id="liThursday_time-11"><input name="rights[]" value="Thursday_time11" id="Thursday_time-11" type="checkbox"></li>
														
													<li id="liFriday_time6"><input name="rights[]" value="Friday_time6" id="Friday_time6" type="checkbox"></li>
													<li id="liFriday_time7"><input name="rights[]" value="Friday_time7" id="Friday_time7" type="checkbox"></li>
												    <li id="liFriday_time8"><input name="rights[]" value="Friday_time8" id="Friday_time8" type="checkbox"></li>
													<li id="liFriday_time9"><input name="rights[]" value="Friday_time9" id="Friday_time9" type="checkbox"></li>
													<li id="liFriday_time-10"><input name="rights[]" value="Friday_time10" id="Friday_time-10" type="checkbox"></li>
													<li id="liFriday_time-11"><input name="rights[]" value="Friday_time11" id="Friday_time-11" type="checkbox"></li>
														
												<li id="liSaturday_time6"><input name="rights[]" value="Saturday_time6" id="Saturday_time6" type="checkbox"></li>
												<li id="liSaturday_time7"><input name="rights[]" value="Saturday_time7" id="Saturday_time7" type="checkbox"></li>
												<li id="liSaturday_time8"><input name="rights[]" value="Saturday_time8" id="Saturday_time8" type="checkbox"></li>
												<li id="liSaturday_time9"><input name="rights[]" value="Saturday_time9" id="Saturday_time9" type="checkbox"></li>
											    <li id="liSaturday_time-10"><input name="rights[]" value="Saturday_time10" id="Saturday_time-10" type="checkbox"></li>
												<li id="liSaturday_time-11"><input name="rights[]" value="Saturday_time11" id="Saturday_time-11" type="checkbox"></li>
														
												      <li id="liSunday_time6"><input name="rights[]" value="Sunday_time6" id="Sunday_time6" type="checkbox"></li>
													  <li id="liSunday_time7"><input name="rights[]" value="Sunday_time7" id="Sunday_time7" type="checkbox"></li>
													  <li id="liSunday_time8"><input name="rights[]" value="Sunday_time8" id="Sunday_time8" type="checkbox"></li>
													  <li id="liSunday_time9"><input name="rights[]" value="Sunday_time9" id="Sunday_time9" type="checkbox"></li>
													  <li id="liSunday_time-10"><input name="rights[]" value="Sunday_time10" id="Sunday_time-10" type="checkbox"></li>
													  <li id="liSunday_time-11"><input name="rights[]" value="Sunday_time11" id="Sunday_time-11" type="checkbox"></li>
														
												       </ul>
												    </div>
												  </td>
                                                  <td style="padding:0px;" valign="top"><div class="time_five">
                                                    <ul>
                                                      <li><a href="javascript:;" name="time-12">12</a></li>
                                                      <li><a href="javascript:;" name="time-13">13</a></li>
                                                      <li><a href="javascript:;" name="time-14">14</a></li>
                                                      <li><a href="javascript:;" name="time-15">15</a></li>
                                                      <li><a href="javascript:;" name="time-16">16</a></li>
                                                      <li><a href="javascript:;" name="time-17">17</a></li>
                                                    </ul>
                                                  </div>
                                                   <div class="more_input">
												         <ul>
											    <li id="liMonday_time-12"><input name="rights[]" value="Monday_time12" id="Monday_time-12" type="checkbox"></li>
												<li id="liMonday_time-13"><input name="rights[]" value="Monday_time13" id="Monday_time-13" type="checkbox"></li>
												<li id="liMonday_time-14"><input name="rights[]" value="Monday_time14" id="Monday_time-14" type="checkbox"></li>
												<li id="liMonday_time-15"><input name="rights[]" value="Monday_time15" id="Monday_time-15" type="checkbox"></li>
												<li id="liMonday_time-16"><input name="rights[]" value="Monday_time16" id="Monday_time-16" type="checkbox"></li>
												<li id="liMonday_time-17"><input name="rights[]" value="Monday_time17" id="Monday_time-17" type="checkbox"></li>
														  
												<li id="liTuesday_time-12"><input name="rights[]" value="Tuesday_time12" id="Tuesday_time-12" type="checkbox"></li>
												<li id="liTuesday_time-13"><input name="rights[]" value="Tuesday_time13" id="Tuesday_time-13" type="checkbox"></li>
												<li id="liTuesday_time-14"><input name="rights[]" value="Tuesday_time14" id="Tuesday_time-14" type="checkbox"></li>
												<li id="liTuesday_time-15"><input name="rights[]" value="Tuesday_time15" id="Tuesday_time-15" type="checkbox"></li>
												<li id="liTuesday_time-16"><input name="rights[]" value="Tuesday_time16" id="Tuesday_time-16" type="checkbox"></li>
												<li id="liTuesday_time-17"><input name="rights[]" value="Tuesday_time17" id="Tuesday_time-17" type="checkbox"></li>
														  
											<li id="liWednesday_time-12"><input name="rights[]" value="Wednesday_time12" id="Wednesday_time-12" type="checkbox"></li>
											<li id="liWednesday_time-13"><input name="rights[]" value="Wednesday_time13" id="Wednesday_time-13" type="checkbox"></li>
											<li id="liWednesday_time-14"><input name="rights[]" value="Wednesday_time14" id="Wednesday_time-14" type="checkbox"></li>
											<li id="liWednesday_time-15"><input name="rights[]" value="Wednesday_time15" id="Wednesday_time-15" type="checkbox"></li>
											<li id="liWednesday_time-16"><input name="rights[]" value="Wednesday_time16" id="Wednesday_time-16" type="checkbox"></li>
											<li id="liWednesday_time-17"><input name="rights[]" value="Wednesday_time17" id="Wednesday_time-17" type="checkbox"></li>
															
												<li id="liThursday_time-12"><input name="rights[]" value="Thursday_time12" id="Thursday_time-12" type="checkbox"></li>
												<li id="liThursday_time-13"><input name="rights[]" value="Thursday_time13" id="Thursday_time-13" type="checkbox"></li>
												<li id="liThursday_time-14"><input name="rights[]" value="Thursday_time14" id="Thursday_time-14" type="checkbox"></li>
												<li id="liThursday_time-15"><input name="rights[]" value="Thursday_time15" id="Thursday_time-15" type="checkbox"></li>
												<li id="liThursday_time-16"><input name="rights[]" value="Thursday_time16" id="Thursday_time-16" type="checkbox"></li>
												<li id="liThursday_time-17"><input name="rights[]" value="Thursday_time17" id="Thursday_time-17" type="checkbox"></li>
														
													<li id="liFriday_time-12"><input name="rights[]" value="Friday_time12" id="Friday_time-12" type="checkbox"></li>
													<li id="liFriday_time-13"><input name="rights[]" value="Friday_time13" id="Friday_time-13" type="checkbox"></li>
												    <li id="liFriday_time-14"><input name="rights[]" value="Friday_time14" id="Friday_time-14" type="checkbox"></li>
													<li id="liFriday_time-15"><input name="rights[]" value="Friday_time15" id="Friday_time-15" type="checkbox"></li>
													<li id="liFriday_time-16"><input name="rights[]" value="Friday_time16" id="Friday_time-16" type="checkbox"></li>
													<li id="liFriday_time-17"><input name="rights[]" value="Friday_time17" id="Friday_time-17" type="checkbox"></li>
														
												<li id="liSaturday_time-12"><input name="rights[]" value="Saturday_time12" id="Saturday_time-12" type="checkbox"></li>
												<li id="liSaturday_time-13"><input name="rights[]" value="Saturday_time13" id="Saturday_time-13" type="checkbox"></li>
												<li id="liSaturday_time-14"><input name="rights[]" value="Saturday_time14" id="Saturday_time-14" type="checkbox"></li>
												<li id="liSaturday_time-15"><input name="rights[]" value="Saturday_time15" id="Saturday_time-15" type="checkbox"></li>
											    <li id="liSaturday_time-16"><input name="rights[]" value="Saturday_time16" id="Saturday_time-16" type="checkbox"></li>
												<li id="liSaturday_time-17"><input name="rights[]" value="Saturday_time17" id="Saturday_time-17" type="checkbox"></li>
														
												      <li id="liSunday_time-12"><input name="rights[]" value="Sunday_time12" id="Sunday_time-12" type="checkbox"></li>
													  <li id="liSunday_time-13"><input name="rights[]" value="Sunday_time13" id="Sunday_time-13" type="checkbox"></li>
													  <li id="liSunday_time-14"><input name="rights[]" value="Sunday_time14" id="Sunday_time-14" type="checkbox"></li>
													  <li id="liSunday_time-15"><input name="rights[]" value="Sunday_time15" id="Sunday_time-15" type="checkbox"></li>
													  <li id="liSunday_time-16"><input name="rights[]" value="Sunday_time16" id="Sunday_time-16" type="checkbox"></li>
													  <li id="liSunday_time-17"><input name="rights[]" value="Sunday_time17" id="Sunday_time-17" type="checkbox"></li>
															
															
												       </ul>
												    </div>
												  </td>
                                                  <td style="padding:0px;" valign="top"><div class="time_five">
                                                    <ul>
                                                      <li><a href="javascript:;" name="time-18">18</a></li>
                                                      <li><a href="javascript:;" name="time-19">19</a></li>
                                                      <li><a href="javascript:;" name="time-20">20</a></li>
                                                      <li><a href="javascript:;" name="time-21">21</a></li>
                                                      <li><a href="javascript:;" name="time-22">22</a></li>
                                                      <li><a href="javascript:;" name="time-23">23</a></li>
                                                    </ul>
                                                  </div>
                                                   <div class="more_input">
												         <ul>
												<li id="liMonday_time-18"><input name="rights[]" value="Monday_time18" id="Monday_time-18" type="checkbox"></li>
												<li id="liMonday_time-19"><input name="rights[]" value="Monday_time19" id="Monday_time-19" type="checkbox"></li>
												<li id="liMonday_time-20"><input name="rights[]" value="Monday_time20" id="Monday_time-20" type="checkbox"></li>
												<li id="liMonday_time-21"><input name="rights[]" value="Monday_time21" id="Monday_time-21" type="checkbox"></li>
												<li id="liMonday_time-22"><input name="rights[]" value="Monday_time22" id="Monday_time-22" type="checkbox"></li>
												<li id="liMonday_time-23"><input name="rights[]" value="Monday_time23" id="Monday_time-23" type="checkbox"></li>
														  
												<li id="liTuesday_time-18"><input name="rights[]" value="Tuesday_time18" id="Tuesday_time-18" type="checkbox"></li>
												<li id="liTuesday_time-19"><input name="rights[]" value="Tuesday_time19" id="Tuesday_time-19" type="checkbox"></li>
												<li id="liTuesday_time-20"><input name="rights[]" value="Tuesday_time20" id="Tuesday_time-20" type="checkbox"></li>
												<li id="liTuesday_time-21"><input name="rights[]" value="Tuesday_time21" id="Tuesday_time-21" type="checkbox"></li>
												<li id="liTuesday_time-22"><input name="rights[]" value="Tuesday_time22" id="Tuesday_time-22" type="checkbox"></li>
												<li id="liTuesday_time-23"><input name="rights[]" value="Tuesday_time23" id="Tuesday_time-23" type="checkbox"></li>
														  
											<li id="liWednesday_time-18"><input name="rights[]" value="Wednesday_time18" id="Wednesday_time-18" type="checkbox"></li>
											<li id="liWednesday_time-19"><input name="rights[]" value="Wednesday_time19" id="Wednesday_time-19" type="checkbox"></li>
											<li id="liWednesday_time-20"><input name="rights[]" value="Wednesday_time20" id="Wednesday_time-20" type="checkbox"></li>
											<li id="liWednesday_time-21"><input name="rights[]" value="Wednesday_time21" id="Wednesday_time-21" type="checkbox"></li>
											<li id="liWednesday_time-22"><input name="rights[]" value="Wednesday_time22" id="Wednesday_time-22" type="checkbox"></li>
											<li id="liWednesday_time-23"><input name="rights[]" value="Wednesday_time23" id="Wednesday_time-23" type="checkbox"></li>
															
												<li id="liThursday_time-18"><input name="rights[]" value="Thursday_time18" id="Thursday_time-18" type="checkbox"></li>
												<li id="liThursday_time-19"><input name="rights[]" value="Thursday_time19" id="Thursday_time-19" type="checkbox"></li>
												<li id="liThursday_time-20"><input name="rights[]" value="Thursday_time20" id="Thursday_time-20" type="checkbox"></li>
												<li id="liThursday_time-21"><input name="rights[]" value="Thursday_time21" id="Thursday_time-21" type="checkbox"></li>
												<li id="liThursday_time-22"><input name="rights[]" value="Thursday_time22" id="Thursday_time-22" type="checkbox"></li>
												<li id="liThursday_time-23"><input name="rights[]" value="Thursday_time23" id="Thursday_time-23" type="checkbox"></li>
														
													<li id="liFriday_time-18"><input name="rights[]" value="Friday_time18" id="Friday_time-18" type="checkbox"></li>
													<li id="liFriday_time-19"><input name="rights[]" value="Friday_time19" id="Friday_time-19" type="checkbox"></li>
												    <li id="liFriday_time-20"><input name="rights[]" value="Friday_time20" id="Friday_time-20" type="checkbox"></li>
													<li id="liFriday_time-21"><input name="rights[]" value="Friday_time21" id="Friday_time-21" type="checkbox"></li>
													<li id="liFriday_time-22"><input name="rights[]" value="Friday_time22" id="Friday_time-22" type="checkbox"></li>
													<li id="liFriday_time-23"><input name="rights[]" value="Friday_time23" id="Friday_time-23" type="checkbox"></li>
														
												<li id="liSaturday_time-18"><input name="rights[]" value="Saturday_time18" id="Saturday_time-18" type="checkbox"></li>
												<li id="liSaturday_time-19"><input name="rights[]" value="Saturday_time19" id="Saturday_time-19" type="checkbox"></li>
												<li id="liSaturday_time-20"><input name="rights[]" value="Saturday_time20" id="Saturday_time-20" type="checkbox"></li>
												<li id="liSaturday_time-21"><input name="rights[]" value="Saturday_time21" id="Saturday_time-21" type="checkbox"></li>
											    <li id="liSaturday_time-22"><input name="rights[]" value="Saturday_time22" id="Saturday_time-22" type="checkbox"></li>
												<li id="liSaturday_time-23"><input name="rights[]" value="Saturday_time23" id="Saturday_time-23" type="checkbox"></li>
														
												      <li id="liSunday_time-18"><input name="rights[]" value="Sunday_time18" id="Sunday_time-18" type="checkbox"></li>
													  <li id="liSunday_time-19"><input name="rights[]" value="Sunday_time19" id="Sunday_time-19" type="checkbox"></li>
													  <li id="liSunday_time-20"><input name="rights[]" value="Sunday_time20" id="Sunday_time-20" type="checkbox"></li>
													  <li id="liSunday_time-21"><input name="rights[]" value="Sunday_time21" id="Sunday_time-21" type="checkbox"></li>
													  <li id="liSunday_time-22"><input name="rights[]" value="Sunday_time22" id="Sunday_time-22" type="checkbox"></li>
													  <li id="liSunday_time-23"><input name="rights[]" value="Sunday_time23" id="Sunday_time-23" type="checkbox"></li>
												       </ul>
												    </div>
												  </td>
                                                </tr>
                                              </tbody></table>
										      <div style="padding-top:15px; height:35px; ">　<img src="../Public/images/over_x.gif" id="submittimeimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"></div>
									     </td>
                                       </tr>
                    </tbody></table>
					</div>
				<div class="fix_language" style=" display:none; " id="divdwAccess">
				  <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr class="tr_xl_tit">
                                         <td width="22%">接入商</td>
                                          <td class="border_l" width="40%"><div class="blue"><a href="javascript:" id="dwAccessall">全部添加</a></div></td>
                                          <td width="20%">已选中接入商</td>
                                          <td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deletealldwaccess()">全部删除</a></div></td>
                                       </tr>
                                       <tr class="tr_white_tit bg_lanse">
                                         <td colspan="4">
										      <div class="left">
										      <div class="dw_l blue" style="height:200px;" id="divdwAccesslist">
						<ul id="accessliantong" name="联通"><li style="width:160px;" class="f12_g">联通</li><li id="spanaddliantong" onclick="adddwaccess('liantong','联通')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="accessdianxin" name="电信"><li style="width:160px;" class="f12_g">电信</li><li id="spanadddianxin" onclick="adddwaccess('dianxin','电信')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="accesswangba" name="网吧"><li style="width:160px;" class="f12_g">网吧</li><li id="spanaddwangba" onclick="adddwaccess('wangba','网吧')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="accessjiaoyu" name="教育"><li style="width:160px;" class="f12_g">教育</li><li id="spanaddjiaoyu" onclick="adddwaccess('jiaoyu','教育')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="accessqita" name="其它"><li style="width:160px;" class="f12_g">其它</li><li id="spanaddqita" onclick="adddwaccess('qita','其它')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>					 
										      </div>
											  <div class="dw_l blue li_bg_grey_l">共5条</div>
											  </div>
											  <div class="left" style="width:381px; margin-left:10px; display:inline;">
											  <div class="dw_r" style="height:200px; float:left;">
											        <div class="r_b blue" style="height:200px;" id="dwaccessrow">
													 
													</div>
											  </div>
											  <div class="blue li_bg_grey_r" id="dwaccessnum">共0条</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="4">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitAccessimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>
					                     </td>
									   </tr>
                    </tbody></table>
					</div>
					<!--------------------------------------------------------------------->
					<div class="fix_language" style=" display:none; " id="divdwoptionsystem">
				  <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                    
                                       <tbody><tr class="tr_xl_tit">
                                         <td width="22%">操作系统</td>
                                          <td class="border_l" width="40%"><div class="blue"><a href="javascript:" id="dwoptionsystemall">全部添加</a></div></td>
                                          <td width="20%">已选中操作系统</td>
                                          <td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deletealldwoptionsystem()">全部删除</a></div></td>
                                       </tr>
                                       <tr class="tr_white_tit bg_lanse">
                                         <td colspan="4">
										      <div class="left">
										      <div class="dw_l blue" style="height:200px;" id="divdwoptionsystemlist">
						<ul id="optionsystemWindowsXp" name="WindowsXp"><li style="width:160px;" class="f12_g">WindowsXp</li><li id="lioptionsystemWindowsXp" onclick="adddwoptionsystem('WindowsXp','WindowsXp')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
					<ul id="optionsystemWindowsVista" name="WindowsVista"><li style="width:160px;" class="f12_g">WindowsVista</li><li id="lioptionsystemWindowsVista" onclick="adddwoptionsystem('WindowsVista','WindowsVista')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="optionsystemWindows2000" name="Windows2000"><li style="width:160px;" class="f12_g">Windows2000</li><li id="lioptionsystemWindows2000" onclick="adddwoptionsystem('Windows2000','Windows2000')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="optionsystemWindows2003" name="Windows2003"><li style="width:160px;" class="f12_g">Windows2003</li><li id="lioptionsystemWindows2003" onclick="adddwoptionsystem('Windows2003','Windows2003')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="optionsystemWindows7" name="Windows7"><li style="width:160px;" class="f12_g">Windows7</li><li id="lioptionsystemWindows7" onclick="adddwoptionsystem('Windows7','Windows7')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
									
						<ul id="optionsystemAndroid" name="Android"><li style="width:160px;" class="f12_g">Android</li><li id="lioptionsystemAndroid" onclick="adddwoptionsystem('Android','Android')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
									
						<ul id="optionsystemiOS" name="iOS"><li style="width:160px;" class="f12_g">iOS</li><li id="lioptionsystemiOS" onclick="adddwoptionsystem('iOS','iOS')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="optionsystemMacintosh" name="Macintosh"><li style="width:160px;" class="f12_g">Macintosh</li><li id="lioptionsystemMacintosh" onclick="adddwoptionsystem('Macintosh','Macintosh')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="optionsystemLinux" name="Linux"><li style="width:160px;" class="f12_g">Linux</li><li id="lioptionsystemLinux" onclick="adddwoptionsystem('Linux','Linux')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="optionsystemqita" name="其它"><li style="width:160px;" class="f12_g">其它</li><li id="lioptionsystemqita" onclick="adddwoptionsystem('qita','其它')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>					 
										      </div>
											  <div class="dw_l blue li_bg_grey_l">共11条</div>
											  </div>
											  <div class="left" style="width:381px; margin-left:10px; display:inline;">
											  <div class="dw_r" style="height:200px; float:left;">
											        <div class="r_b blue" style="height:200px;" id="dwoptionsystemrow">
													 
													</div>
											  </div>
											  <div class="blue li_bg_grey_r" id="dwoptionsystemnum">共0条</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="4">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitoptionsystemimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>
					                     </td>
									   </tr>
                    </tbody></table>
					</div>
					
					<!--------------------------------------------------------------------->
					<div class="fix_language" style=" display:none; " id="divdwRespectivelyrate">
				  <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                    
                                       <tbody><tr class="tr_xl_tit">
                                         <td width="22%">分辨率</td>
                                          <td class="border_l" width="40%"><div class="blue"><a href="javascript:" id="dwRespectivelyrateall">全部添加</a></div></td>
                                          <td width="20%">已选中分辨率</td>
                                          <td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deletealldwRespectivelyrate()">全部删除</a></div></td>
                                       </tr>
                                       <tr class="tr_white_tit bg_lanse">
                                         <td colspan="4">
										      <div class="left">
										      <div class="dw_l blue" style="height:200px;" id="divdwRespectivelyratelist">
						<ul id="Respectivelyrate640_480" name="640_480"><li style="width:160px;" class="f12_g">640*480</li><li id="liRespectivelyrate640_480" onclick="adddwRespectivelyrate('640_480','640_480')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate800_600" name="800_600"><li style="width:160px;" class="f12_g">800*600</li><li id="liRespectivelyrate800_600" onclick="adddwRespectivelyrate('800_600','800_600')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1024_768" name="1024_768"><li style="width:160px;" class="f12_g">1024*768</li><li id="liRespectivelyrate1024_768" onclick="adddwRespectivelyrate('1024_768','1024_768')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1152_864" name="1152_864"><li style="width:160px;" class="f12_g">1152*864</li><li id="liRespectivelyrate1152_864" onclick="adddwRespectivelyrate('1152_864','1152_864')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1280_720" name="1280_720"><li style="width:160px;" class="f12_g">1280*720</li><li id="liRespectivelyrate1280_720" onclick="adddwRespectivelyrate('1280_720','1280_720')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1280_768" name="1280_768"><li style="width:160px;" class="f12_g">1280*768</li><li id="liRespectivelyrate1280_768" onclick="adddwRespectivelyrate('1280_768','1280_768')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1280_800" name="1280_800"><li style="width:160px;" class="f12_g">1280*800</li><li id="liRespectivelyrate1280_800" onclick="adddwRespectivelyrate('1280_800','1280_800')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1280_960" name="1280_960"><li style="width:160px;" class="f12_g">1280*960</li><li id="liRespectivelyrate1280_960" onclick="adddwRespectivelyrate('1280_960','1280_960')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1280_1024" name="1280_1024"><li style="width:160px;" class="f12_g">1280*1024</li><li id="liRespectivelyrate1280_1024" onclick="adddwRespectivelyrate('1280_1024','1280_1024')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1360_768" name="1360_768"><li style="width:160px;" class="f12_g">1360*768</li><li id="liRespectivelyrate1360_768" onclick="adddwRespectivelyrate('1360_768','1360_768')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1366_768" name="1366_768"><li style="width:160px;" class="f12_g">1366*768</li><li id="liRespectivelyrate1366_768" onclick="adddwRespectivelyrate('1366_768','1366_768')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1400_1050" name="1400_1050"><li style="width:160px;" class="f12_g">1400*1050</li><li id="liRespectivelyrate1400_1050" onclick="adddwRespectivelyrate('1400_1050','1400_1050')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1440_900" name="1440_900"><li style="width:160px;" class="f12_g">1440*900</li><li id="liRespectivelyrate1440_900" onclick="adddwRespectivelyrate('1440_900','1440_900')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1680_1050" name="1680_1050"><li style="width:160px;" class="f12_g">1680*1050</li><li id="liRespectivelyrate1680_1050" onclick="adddwRespectivelyrate('1680_1050','1680_1050')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrate1920_1200" name="1920_1200"><li style="width:160px;" class="f12_g">1920*1200</li><li id="liRespectivelyrate1920_1200" onclick="adddwRespectivelyrate('1920_1200','1920_1200')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="Respectivelyrateqita" name="其它"><li style="width:160px;" class="f12_g">其它</li><li id="liRespectivelyrateqita" onclick="adddwRespectivelyrate('qita','其它')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>					 
										      </div>
											  <div class="dw_l blue li_bg_grey_l">共16条</div>
											  </div>
											  <div class="left" style="width:381px; margin-left:10px; display:inline;">
											  <div class="dw_r" style="height:200px; float:left;">
											        <div class="r_b blue" style="height:200px;" id="dwRespectivelyraterow">
													 
													</div>
											  </div>
											  <div class="blue li_bg_grey_r" id="dwRespectivelyratenum">共0条</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="4">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitRespectivelyrateimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>
					                     </td>
									   </tr>
                    </tbody></table>
					</div>
						<!--------------------------------------------------------------------->
					<div class="fix_language" style=" display:none; " id="divdwbrowserlanguage">
				  <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr class="tr_xl_tit">
                                         <td width="22%">浏览器语言</td>
                                          <td class="border_l" width="40%"><div class="blue"><a href="javascript:" id="dwbrowserlanguageall">全部添加</a></div></td>
                                          <td width="20%">已选中浏览器语言</td>
                                          <td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deletealldwbrowserlanguage()">全部删除</a></div></td>
                                       </tr>
                                       <tr class="tr_white_tit bg_lanse">
                                         <td colspan="4">
										      <div class="left">
										      <div class="dw_l blue" style="height:200px;" id="divdwbrowserlanguagelist">
						<ul id="browserlanguagechineses" name="简体中文"><li style="width:160px;" class="f12_g">简体中文</li><li id="librowserlanguagechineses" onclick="adddwbrowserlanguage('chineses','简体中文')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browserlanguagechinesec" name="繁体中文"><li style="width:160px;" class="f12_g">繁体中文</li><li id="librowserlanguagechinesec" onclick="adddwbrowserlanguage('chinesec','繁体中文')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browserlanguageenglish" name="英语"><li style="width:160px;" class="f12_g">英语</li><li id="librowserlanguageenglish" onclick="adddwbrowserlanguage('english','英语')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browserlanguagejapanese" name="日语"><li style="width:160px;" class="f12_g">日语</li><li id="librowserlanguagejapanese" onclick="adddwbrowserlanguage('japanese','日语')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browserlanguagekourou" name="韩语"><li style="width:160px;" class="f12_g">韩语</li><li id="librowserlanguagekourou" onclick="adddwbrowserlanguage('kourou','韩语')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browserlanguageqita" name="其它"><li style="width:160px;" class="f12_g">其它</li><li id="librowserlanguageqita" onclick="adddwbrowserlanguage('qita','其它')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>					 
										      </div>
											  <div class="dw_l blue li_bg_grey_l">共6条</div>
											  </div>
											  <div class="left" style="width:381px; margin-left:10px; display:inline;">
											  <div class="dw_r" style="height:200px; float:left;">
											        <div class="r_b blue" style="height:200px;" id="dwbrowserlanguagerow">
													 
													</div>
											  </div>
											  <div class="blue li_bg_grey_r" id="dwbrowserlanguagenum">共0条</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="4">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitbrowserlanguageimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>
					                     </td>
									   </tr>
                    </tbody></table>
					</div>
					
					<div class="fix_language" style=" display:none; " id="divdwbrowsertype">
				  <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr class="tr_xl_tit">
                                         <td width="22%">浏览器类型</td>
                                          <td class="border_l" width="40%"><div class="blue"><a href="javascript:" id="browsertypeall">全部添加</a></div></td>
                                          <td width="20%">已选中浏览器类型</td>
                                          <td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deletealldwbrowsertype()">全部删除</a></div></td>
                                       </tr>
                                       <tr class="tr_white_tit bg_lanse">
                                         <td colspan="4">
										      <div class="left">
										      <div class="dw_l blue" style="height:200px;" id="divdwbrowsertypelist">
						<ul id="browsertypeInternetExplorer6" name="微软IE6"><li style="width:160px;" class="f12_g">微软IE6</li><li id="liaddInternetExplorer6" onclick="adddwbrowsertype('InternetExplorer6','微软IE6')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeInternetExplorer7" name="微软IE7"><li style="width:160px;" class="f12_g">微软IE7</li><li id="liaddInternetExplorer7" onclick="adddwbrowsertype('InternetExplorer7','微软IE7')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeInternetExplorer8" name="微软IE8"><li style="width:160px;" class="f12_g">微软IE8</li><li id="liaddInternetExplorer8" onclick="adddwbrowsertype('InternetExplorer8','微软IE8')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeInternetExplorer9" name="微软IE9"><li style="width:160px;" class="f12_g">微软IE9</li><li id="liaddInternetExplorer9" onclick="adddwbrowsertype('InternetExplorer9','微软IE9')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertype360safe" name="360安全浏览器"><li style="width:160px;" class="f12_g">360安全浏览器</li><li id="liadd360safe" onclick="adddwbrowsertype('360safe','360安全浏览器')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						
						<ul id="browsertypesougou" name="搜狗"><li style="width:160px;" class="f12_g">搜狗</li><li id="liaddsougou" onclick="adddwbrowsertype('sougou','搜狗')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeTT" name="腾讯TT"><li style="width:160px;" class="f12_g">腾讯TT</li><li id="liaddTT" onclick="adddwbrowsertype('TT','腾讯TT')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeMaxthon" name="遨游Maxthon"><li style="width:160px;" class="f12_g">遨游Maxthon</li><li id="liaddMaxthon" onclick="adddwbrowsertype('Maxthon','遨游Maxthon')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeTheWorld" name="世界之窗TheWorld"><li style="width:160px;" class="f12_g">世界之窗TheWorld</li><li id="liaddTheWorld" onclick="adddwbrowsertype('TheWorld','世界之窗TheWorld')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeFireFox" name="火狐FireFox"><li style="width:160px;" class="f12_g">火狐FireFox</li><li id="liaddFireFox" onclick="adddwbrowsertype('FireFox','火狐FireFox')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeChrome" name="谷歌Chrome"><li style="width:160px;" class="f12_g">谷歌Chrome</li><li id="liaddChrome" onclick="adddwbrowsertype('Chrome','谷歌Chrome')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeSafari" name="苹果Safari"><li style="width:160px;" class="f12_g">苹果Safari</li><li id="liaddSafari" onclick="adddwbrowsertype('Safari','苹果Safari')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>
						<ul id="browsertypeOpera" name="Opera"><li style="width:160px;" class="f12_g">Opera</li><li id="liaddOpera" onclick="adddwbrowsertype('Opera','Opera')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul>	
						<ul id="browsertypeqita" name="其它"><li style="width:160px;" class="f12_g">其它</li><li id="liaddqita" onclick="adddwbrowsertype('qita','其它')" style="color:#3377AA;cursor:pointer;text-decoration:underline;width:150px;">添加</li></ul> 
										      </div>
											  <div class="dw_l blue li_bg_grey_l">共12条</div>
											  </div>
											  <div class="left" style="width:381px; margin-left:10px; display:inline;">
											  <div class="dw_r" style="height:200px; float:left;">
											        <div class="r_b blue" style="height:200px;" id="dwbrowsertype">
													      
													</div>
											  </div>
											  <div class="blue li_bg_grey_r" id="dwbrowsertypenum">共0条</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="4">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitbrowsertypeimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>
					                     </td>
									   </tr>
                    </tbody></table>
					</div>
					<div class="fix_data" style=" display:none;" id="divdwdate">
				     <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr>
                                         <td style="background-color:#EBF6FC;">
										      <div class="dw_l blue" style="height:226px; overflow:hidden;">
											        <div id="calendarTdatedw"><table class="data_top"><tbody><tr><td id="prevYearIc5n9lVSnPa18F68W2DPetQ99uK6r87b" class="prevYearActive" title="前一年">&nbsp;</td><td id="prevMonthIc5n9lVSnPa18F68W2DPetQ99uK6r87b" class="prevMonthActive" title="前一月">&nbsp;</td><td class="currentDate">十一月  2013</td><td id="nextMonthIc5n9lVSnPa18F68W2DPetQ99uK6r87b" class="nextMonthActive" title="后一月">&nbsp;</td><td id="nextYearIc5n9lVSnPa18F68W2DPetQ99uK6r87b" class="nextYearActive" title="后一年">&nbsp;</td></tr></tbody></table><div id="contentdingIc5n9lVSnPa18F68W2DPetQ99uK6r87b" class="contentding"><table><tbody><tr class="weekdays"><td> 日</td><td> 一</td><td> 二</td><td> 三</td><td> 四</td><td> 五</td><td> 六</td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class="isbeforeDayClass" id="20131101Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">1</td><td class="isbeforeDayClass" id="20131102Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">2</td></tr><tr><td class="isbeforeDayClass" id="20131103Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">3</td><td class="isbeforeDayClass" id="20131104Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">4</td><td class="isbeforeDayClass" id="20131105Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">5</td><td class="isbeforeDayClass" id="20131106Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">6</td><td class="isbeforeDayClass" id="20131107Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">7</td><td class="isbeforeDayClass" id="20131108Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">8</td><td class="isbeforeDayClass" id="20131109Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">9</td></tr><tr><td class="isbeforeDayClass" id="20131110Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">10</td><td class="isbeforeDayClass" id="20131111Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">11</td><td class="isbeforeDayClass" id="20131112Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">12</td><td class="isbeforeDayClass" id="20131113Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">13</td><td class="isbeforeDayClass" id="20131114Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">14</td><td class="isbeforeDayClass" id="20131115Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">15</td><td class="isbeforeDayClass" id="20131116Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">16</td></tr><tr><td class="isbeforeDayClass" id="20131117Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">17</td><td class="isbeforeDayClass" id="20131118Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">18</td><td class="isbeforeDayClass" id="20131119Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">19</td><td class="isbeforeDayClass" id="20131120Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">20</td><td class="isbeforeDayClass" id="20131121Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">21</td><td class="isbeforeDayClass" id="20131122Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">22</td><td class="isbeforeDayClass" id="20131123Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">23</td></tr><tr><td class="isbeforeDayClass" id="20131124Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">24</td><td class="isbeforeDayClass" id="20131125Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">25</td><td class="isToday" id="20131126Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">26</td><td class="isDate" id="20131127Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">27</td><td class="isDate" id="20131128Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">28</td><td class="isDate" id="20131129Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">29</td><td class="isDate" id="20131130Ic5n9lVSnPa18F68W2DPetQ99uK6r87b">30</td></tr><tr></tr></tbody></table></div></div>
                                                   <script>
												  	var ecT = new calendar_dd();
													ecT.properties.holder='calendarTdatedw';
													ecT.properties.callback = function(cal){
													var j=0;
													var getdate;
													var getmonth;
													var datearraycome= new Array();
													for(var i in cal.cache.selectedDates){
														if(cal.cache.selectedDates[i] == true){
															
															var selectedDate = ecT.stringToDate(i);
														
															getdate=selectedDate.getDate();
															
															if(selectedDate.getDate()<10) 
																{
																	getdate='0'+selectedDate.getDate();
																}
															getmonth=parseInt(selectedDate.getMonth()+1);
															if(getmonth<10)
																{
																	getmonth='0'+parseInt(selectedDate.getMonth()+1);
																}
																j++;
														}
														datearraycome.push(selectedDate.getFullYear()+'-'+getmonth+'-'+getdate);
														
													}
													$('#datedwnumall').html(j);
													if(datearraycome.length<datedb2.length)
														{
															
															
															deletedatecheck(removeSamedate(datearraycome,datedb2));
															datedb2=datearraycome;
														}
													else
														{
															datecheck(removeSamedate(datedb2,datearraycome));
															datedb2=datearraycome;
														}
														
													
														};
													ecT.init(null,null,'calendarTdatedw');
												   </script>
										      </div>
											  <div class="dw_r" style="height:226px; overflow:hidden;">
											        <div class="data_del">
													      <span class="left"><b>已添加日期</b></span>
														  <span class="right blue"><a id="delealldatedw" href="javascript:">全部删除</a>　共<font id="datedwnumall"></font>天</span>
													</div>
											        <div class="r_b blue" style="height:200px;">
													    <div class="data_list" id="debug">
													     
													  </div>
													</div>
											  </div>
										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td style="border-top:1px solid #d3e6f4;">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitdateimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer"> </div>						                  </td>
									   </tr>
                    </tbody></table>
					</div>
					<div class="fix_url" style=" display:none;" id="divdwaccessurl">
				     <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">

                                       <tbody><tr>
                                         <td valign="top" width="41%">
										      <div class="ll_url">
										        <textarea name="accessurltextarea" cols="50" rows="10" id="accessurltextarea" style="resize: none;"></textarea>
										      </div>										 </td>
                                         <td valign="top" width="59%">
										       <div class="url_tip">
											      <p>指向访问指定“受访URL”的访客，显示广告，例如：cnzz.com/news。</p>
                                                  <p>URL支持部分匹配，不含“http://”，每行限输入一个。</p>
												   <p>当访客访问URL中含有该字符串的网页时，显示广告。</p>
												  <div class="tips_error left mar_t10" style="margin-left:0px;display:none;height:auto" id="accessurlerror"></div>
											  </div>										 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="2" style="border-top:1px solid #d3e6f4;">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitaccessurlimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" style="cursor:pointer" name="cancelimg"> </div>						                  </td>
									   </tr>
                    </tbody></table>
					</div>
					<div class="fix_url" style=" display:none;" id="divdwdomain">
				     <table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%">
                                       <tbody><tr>
                                         <td valign="top" width="41%">
										      <div class="ll_url">
										        <textarea name="domaintextarea" cols="50" rows="10" id="domaintextarea" style="resize: none;"></textarea>
										      </div>										 </td>
                                         <td valign="top" width="59%">
										      <div class="url_tip">
											      <p>指向来自指定“来路域名”的访客，显示广告，例如：www.cnzz.com。</p>
                                                  <p>域名不含“http://”，每行限输入一个。</p>
                                                  <p class="blue">如对直接输入网址访客定向，请输入<a href="javascript:" id="directclick">(direct)</a>表示直达。</p>
												  <div class="tips_error left mar_t10" style="margin-left:0px;display:none;height:auto" id="domainerror"></div>
											  </div>											 </td>
                                       </tr>
									   <tr class="tr_ft_bg put_bg">
									     <td colspan="2" style="border-top:1px solid #d3e6f4;">
										  <div class="left">　<img src="../Public/images/over_x.gif" id="submitdomainlimg" style="cursor:pointer">　<img src="../Public/images/cancel.gif" style="cursor:pointer" name="cancelimg"> </div>			                  </td>
									   </tr>
                    </tbody></table>
					</div>
					<div class="fix_language" style=" display:none; " id="divdwpserid"><table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr class="tr_xl_tit"><td width="22%">车系</td><td class="border_l" width="40%"><div class="blue"><a href="javascript:" onclick="pullallorientaiton('pserid')">全部添加</a></div></td><td width="20%">已选中车系</td><td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deleteallorientation('pserid')">全部删除</a></div></td></tr><tr class="tr_white_tit bg_lanse"><td colspan="4"><div class="left"> <div class="dw_l blue" style="height:200px;" id="divdwpseridlist"><ul id="pserid1" name="1"><li style="width:160px;" class="f12_g">1</li>	<li id="lipserid1" onclick="addorientationoneul('pserid','1')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="pserid2" name="2"><li style="width:160px;" class="f12_g">2</li>	<li id="lipserid2" onclick="addorientationoneul('pserid','2')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="pserid3" name="3"><li style="width:160px;" class="f12_g">3</li>	<li id="lipserid3" onclick="addorientationoneul('pserid','3')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="pserid4" name="4"><li style="width:160px;" class="f12_g">4</li>	<li id="lipserid4" onclick="addorientationoneul('pserid','4')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="pserid5" name="5"><li style="width:160px;" class="f12_g">5</li>	<li id="lipserid5" onclick="addorientationoneul('pserid','5')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul> </div> <div class="dw_l blue li_bg_grey_l">共5条</div></div><div class="left" style="width:381px; margin-left:10px; display:inline;"><div class="dw_r" style="height:200px; float:left;"><div class="r_b blue" style="height:200px;" id="dworipseridrow"></div></div><div class="blue li_bg_grey_r" id="dwpseridnum">共<font id="divdwnumpserid">0</font>条</div></div> </td></tr> <tr class="tr_ft_bg put_bg"> <td colspan="4"><div class="left">　<img src="../Public/images/over_x.gif" style="cursor:pointer" onclick="submitorientation('pserid','车系')"><img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer;margin-left:15px"> </div></td> </tr></tbody></table></div><div class="fix_language" style=" display:none; " id="divdw12"><table style=" border:1px solid #d4e6f2; background-color:#fff;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr class="tr_xl_tit"><td width="22%">我的频道</td><td class="border_l" width="40%"><div class="blue"><a href="javascript:" onclick="pullallorientaiton('12')">全部添加</a></div></td><td width="20%">已选中我的频道</td><td class="border_l" width="18%"><div class="blue"><a href="javascript:" onclick="deleteallorientation('12')">全部删除</a></div></td></tr><tr class="tr_white_tit bg_lanse"><td colspan="4"><div class="left"> <div class="dw_l blue" style="height:200px;" id="divdw12list"><ul id="121" name="1"><li style="width:160px;" class="f12_g">1</li>	<li id="li121" onclick="addorientationoneul('12','1')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="122" name="2"><li style="width:160px;" class="f12_g">2</li>	<li id="li122" onclick="addorientationoneul('12','2')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="123" name="3"><li style="width:160px;" class="f12_g">3</li>	<li id="li123" onclick="addorientationoneul('12','3')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul><ul id="124" name="4"><li style="width:160px;" class="f12_g">4</li>	<li id="li124" onclick="addorientationoneul('12','4')" style="color:#3377AA;width:150px;cursor:pointer;text-decoration:underline;">添加</li></ul> </div> <div class="dw_l blue li_bg_grey_l">共4条</div></div><div class="left" style="width:381px; margin-left:10px; display:inline;"><div class="dw_r" style="height:200px; float:left;"><div class="r_b blue" style="height:200px;" id="dwori12row"></div></div><div class="blue li_bg_grey_r" id="dw12num">共<font id="divdwnum12">0</font>条</div></div> </td></tr> <tr class="tr_ft_bg put_bg"> <td colspan="4"><div class="left">　<img src="../Public/images/over_x.gif" style="cursor:pointer" onclick="submitorientation('12','我的频道')"><img src="../Public/images/cancel.gif" name="cancelimg" style="cursor:pointer;margin-left:15px"> </div></td> </tr></tbody></table></div>
					</div>
					</div>
					
					
					
					
					
					
					
					 <table width="100%">
				  <tbody><tr>
			
						   
                         <td style="" height="28" align="left" width="35%">
						   <input value="0" id="tou_num2" type="hidden">
						   
						   <img src="../Public/images/up.gif" id="tou_num" style="display:;cursor:pointer;padding-left:0px;margin-left:14px" align="absmiddle"><span id="tou_num_a" style="display:;padding-left:8px;">设置每访客展现次数</span>
						   <input value="1" id="tou_num3" type="hidden">
						 
                           <img src="../Public/images/down2.gif" id="tou_num1" style="display:none;cursor:pointer;padding-left:0px;margin-left:14px" align="absmiddle"><span id="tou_num_b" style="display:none;padding-left:8px;">设置每访客展现次数</span>
						   <input id="tou_num_ab" value="0" type="hidden">
						   </td>
                         
                       
						   
						   
						   
						   
						   
				  <td style="" height="28" align="left" width="65%">
						  
						   <img src="../Public/images/up.gif" style="cursor: pointer; display: inline;" id="deliverynumlimit" align="absmiddle">
						   <span style="padding-left: 5px; display: inline;">定量投放</span>

						   </td>
						   
						   
						   
						   
						   
						   
						   
						   
						   
						   
				  
				  </tr>
				  <tr>
				  	<td height="8">
					  <div class="cishu blue" style="padding-left:1px;" id="show">
					<div class="cishu blue" id="show1" style="display:none;padding-left:10px;">
						<p><span class="left" style="float:left;padding-left:5px">每天展示：<span style="display:none;" id="everyday">
						<input id="day" name="material_day" style="margin-left:-3px;width:85px" type="text">次<a href="javascript:;" id="noone">不限</a></span></span>
						</p><div style="display:none;" class="tips_error left" id="show_error1 left"></div>
						<span id="no_day_limit" style="display:;">不限</span>
						<a href="javascript:" id="one" style="display:;">设定次数</a><p></p>
						  <p style="clear: both;"><span class="left" style="padding-left:5px">每小时展示：<span style="display:none;" id="everyhour">
						  <input id="hour" name="material_hour" style="width:85px" type="text">次 <a href="javascript:;" id="notwo">
						  不限 </a></span></span>
						  </p><div style="display:none;" class="tips_error left" id="show_error2"></div>
						  <span id="no_hour_limit" style="display:;">不限</span>
						  <a href="javascript:" id="two" style="display:;width: 190px;">设定次数</a><p></p>
						  <p style="clear: both;"></p><div style="float:left;padding-left:5px"><span class="left">每<input id="pranyminu" value="1" style="width:20px" type="text">分钟展示：<span style="display:none;" id="everyminute"><input style="width:85px" id="minute" name="material_minute" type="text">次   <a href="javascript:;" id="nothree">不限</a></span></span> 
						  <span id="no_minute_limit" style="display:;">不限
						  <a href="javascript:" id="three" style="display:;width: 190px;">设定次数</a></span></div><div style="display:none;" class="tips_error left" id="show_error3"></div><p></p>
					</div>	
					</div>
			</td>
				 
				  
				  
				  
				  
				  
				  
				  
						
						 <td><div style="height:85px; line-height:85px;display:none" id="deliverynumlimitdiv"> 
						 
						 
						 
						 <div style="height:30px; line-height:30px;  "> <span id="showhidedeliverynum">
						  <span>定量投放：</span> <span id="hidenumlimit" style="display:;"><select style="height:22px;width:82px" id="charge_mode"><option selected="selected" value="cpm"> 展现次数</option><option value="cpc"> 点击次数</option></select></span>
                               <span class="blue"><span id="cpdnumber" style="display:none">不限</span><span id="orthernumber" style=""><span id="delivery_bignum">
											<span>不限</span>
											<span><a href="javascript:" id="delivery_changenum">设定数量</a></span>
											</span>
											<span id="delivery_smailnum" style="display:none">
											<span><input id="delivery_num" size="10" name="delivery_num" type="text"></span>
											<span><a href="javascript:" id="delivery_nonum">不限</a></span>
											
											</span></span></span></span>
											
											
											</div>
											<div style=" height:30px; line-height:30px;   ">
											<span id="everydaylimitdiv" style="">
							<span style="" id="everydaylimitspan">每天展现：</span>
							<span class="blue" id="">
							<span id="day_max1">
								<span>不限</span>
								<span><a id="daymaxlimit" href="javascript:">设定数量</a></span>
							</span>
							<span style="display:none" id="day_max2">
								<span><input name="day_max" size="10" id="day_max" type="text"></span>
								<span><a id="daymaxnolimit" href="javascript:">不限</a></span>
								
							</span>
							</span>
							
							</span>
						   <span style="margin-left:1px;display:none" class="tips_error" id="checkdaymax"></span>
						   </div>
						   
						   						   <div style="height: 30px; line-height: 30px;" id="hourmaxlimit_div">
							<span>
								<span>每小时展现：</span>
								<span class="blue">
									<span id="hour_max1">
										<span>不限</span>
										<span><a id="hourmaxlimit" href="javascript:">设定数量</a></span>
									</span>
									<span style="display:none" id="hour_max2">
										<span><input name="per_hour_max" size="10" id="per_hour_max" type="text"></span>
										<span><a id="hourmaxnolimit" href="javascript:">不限</a></span>
									</span>
								</span>
							</span>
						   	<span style="margin-left:1px;display:none" class="tips_error" id="per_hour_max_error"></span>
						 </div>
						 <script type="text/javascript">
$(function(){
	//设定数量
	$('#hourmaxlimit').click(function(){
		$('#hour_max1').hide();
		$('#hour_max2').show();
	});
	//不限
	$('#hourmaxnolimit').click(function(){
		$('#hour_max1').show();
		$('#hour_max2').hide();
		$('#per_hour_max').val('');
		$('#per_hour_max_error').hide();
	});
	//每小时展现只能填写整数
	$("#per_hour_max").keyup(function () {
		var txt_len = $.trim($('#per_hour_max').val()).length;
		if (txt_len != 0) {
			var z = /^([1-9][0-9]*)$/　;
			if (!z.test($('#per_hour_max').val())) {
				$('#per_hour_max_error').html('填写1~10亿的整数').show();
			} else if ($('#per_hour_max').val() > 1000000000) {
				$('#per_hour_max_error').html('填写1~10亿的整数').show();
			} else {
				$('#per_hour_max_error').hide();
			}
		} else {
			$('#per_hour_max_error').hide();
		}
	});
});
</script>
						   
						   </div>
						   </td>
					
				  
				  
				  
				  
				  
				  
				  
				  
				  
				  
				  
				  
				  

				  
				 
				  
				  
				  </tr>
				    <tr><td colspan="2" height="5"></td></tr>	
				  
				  <tr>
				  <td style="" colspan="2" height="18" align="left" width="45%">
						  
						   <img src="../Public/images/up.gif" style="cursor: pointer; display: inline;margin-left:14px" id="setpricelimit" align="absmiddle">
						   <span style="padding-left: 6px; display: inline;">计费方式</span>

						   </td>
				  
				  
				  </tr>
				  
				  <tr>
				  <td colspan="2"><div style="padding-left:13px"><table id="setpricelimittable" style=" display:none ">
				      <tbody><tr>
                           <td height="35" align="right">计费方式：</td>
                           <td align="center"></td>
                           <td class="blue"><select name="price_mode" class="select_1" style="width: 105px;" id="price_mode">
                             <option value="cpd">CPD&nbsp;&nbsp;-按天</option>
							  <option value="cpt">CPT&nbsp;&nbsp;-按时长</option>
							 <option selected="selected" value="cpm">CPM&nbsp;&nbsp;-按展现</option>
							 <option value="cpc">CPC&nbsp;&nbsp;-按点击</option>
							 <option value="cpa">CPA&nbsp;&nbsp;-按行为</option>
                           </select>
						 
											
						  </td>
                         </tr>
                         <tr id="cpahide">
                           <td height="35" align="right">计费单价：</td>
                           <td align="center"></td>
                           <td class="blue"><table border="0" cellpadding="0" cellspacing="0" width="100%">
                             <tbody><tr>
                               <td width="49%"><input name="delivery_price" size="10" value="0" id="delivery_price" type="text">
                                 <label id="charge_mode_list">元/千次展现</label><label id="checkdelivery_price" class="tips_error" style="width:55px;display:none"></label></td>
                              
                             </tr>
                           </tbody></table></td>
                         </tr>
				  
				  </tbody></table></div>
				  </td>
				  
				  </tr>
				  
				  
				  </tbody></table>
					
					
			 <div class="jb_info mar_t20" style="margin-top:30px!important;height:0px"></div>
					  <div style="margin-top:15px;">
							   <span>优先级/权重：&nbsp;&nbsp;</span>
                              
							   
							   <select id="priority_type" name="priority_type" class="select_1" style="width:60px;">
							   
							   <option value="1">高</option>
								<option value="2" selected="selected">中</option>
							<option value="3">低</option>
							   </select>
							   
							   <select name="priority_weight" class="select_1" style="width:60px;" id="priority_weight">
                                        <option value="1">1</option>
									    <option value="2">2</option>
									    <option value="3">3</option>
									    <option value="4">4</option>
									    <option selected="selected" value="5">5</option>
									    <option value="6">6</option>
									    <option value="7">7</option>
									    <option value="8">8</option>
										<option value="9">9</option>
										<option value="10">10</option>
                               </select>
							  <div class="statistic1">
					             <div class="contextual_help" style=" left: 210px;_left:228px;*+left:228px; top:-18px;_top:-22px;*+top:-22px">
								 <a href="#" onmouseout="closeHelp(330);" onmouseover="showHelp(330);"> </a>
								 <div id="key330" style="display: none;left:22px;_left:22px;*+left:22px"> 
								      <p>优先级指广告投放优先级，顺序为：高&gt;中&gt;低。</p>
									  <p>当有“高”级广告时，将覆盖“中”级的广告显示。</p>
									  <p>当有“中”级广告时，将覆盖“低”级的广告显示。</p>
									  <p>优先级相同时，权重高的显示概率更高。</p>
								 </div>
								 </div>
					         </div>
                         </div>
					<!--广告位富媒体模版-->
		<input id="slot_source_material_id" value="0" name="slot_source_material_id" type="hidden">	 
						 
<input id="slotcodeinwhere" value="1" name="slotcodeinwhere" type="hidden">			
		
					<!--页面返回参数-->
				  <input id="slot_look_adsite" value="&amp;cd_mask=&amp;staus_mask=6&amp;page=1&amp;rows=15" name="slot_look_adsite" type="hidden">
				   <!--提交表单cooike-->
				    <input name="adm_cnzz_token" id="adm_cnzz_token" value="79023d0e8772c1a7cd9b7926d5133bed" type="hidden">
				  <!--提交表单隐藏的order-->
				<input value="86961" name="deliveryid" id="deliveryid" type="hidden">
				<input value="97494" id="slotnamevalue" type="hidden">
				<input id="salemangridTablevalue" value="" name="salemangridTablevalue" type="hidden">
				<input id="companygridTablevalue" value="0" name="companygridTablevalue" type="hidden">
				<input id="linkmangridTablevalue" value="" name="linkmangridTablevalue" type="hidden">
				<input id="dailigridTablevalue" value="0" name="dailigridTablevalue" type="hidden">
				<input id="daililinkgridTablevalue" value="" name="daililinkgridTablevalue" type="hidden">
				<input value="97494" id="submitslotname" name="submitslotname" type="hidden">
				<input id="selectorderid" name="selectorderid" value="1080" type="hidden">
				<!-- 定向投放提交内容-->
				<input id="territorydengyu" value="" name="territorydengyu" type="hidden">
				<input id="datedengyu" value="" name="datedengyu" type="hidden">
				<input id="timedengyu" value="" name="timedengyu" type="hidden">
				<input id="Accessdengyu" value="" name="Accessdengyu" type="hidden">
				<input id="browsertypedengyu" value="" name="browsertypedengyu" type="hidden">
				<input id="browserlanguagedengyu" value="" name="browserlanguagedengyu" type="hidden">
				<input id="optionsystemdengyu" value="" name="optionsystemdengyu" type="hidden">
				<input id="Respectivelyratedengyu" value="" name="Respectivelyratedengyu" type="hidden">
				<input id="accessurldengyu" value="" type="hidden">
				<input id="domaindengyu" value="" type="hidden">
				<input id="submitalldelivery" name="submitalldelivery" type="hidden">
				<input id="orientationstringall" value="" name="orientationstringall" type="hidden">
				<!-- 定向投放等于不等于-->
				
				<input id="territoryyesorno" value="1" type="hidden">
				<input id="dateyesorno" value="1" type="hidden">
				<input id="Accessyesorno" value="1" type="hidden">
				<input id="browsertypeyesorno" value="1" type="hidden">
				<input id="browserlanguageyesorno" value="1" type="hidden">
				<input id="optionsystemyesorno" value="1" type="hidden">
				<input id="Respectivelyrateyesorno" value="1" type="hidden">
				
				
				
					<!-- 新加的两个-->
				<input id="domainyesorno" value="1" type="hidden">
				<input id="accessurlyesorno" value="1" type="hidden">
				<!-- 复制广告-->

				<input id="iscopy" value="no" type="hidden">
				
				
				 <!-- material_id：相关联物料id  str1： 权重  material_change：物料轮换方式 material_time：flash轮换时间间隔 d_rate：展现次数   -->
               <input id="material_id" name="material_id" value="76400," type="hidden">

                 <input id="str1" name="str1" type="hidden">
                 <input id="material_change" name="material_change" type="hidden">
                 <input id="material_time" name="material_time" type="hidden">
                 <input id="d_rate" name="d_rate" type="hidden">
				 <div class="mar_t20 h_40" align="center"><a href="javascript:"><img src="../Public/images/touf_over.gif" onclick="sendlogtoserver(144,2,-1,89476),deliverysumbit()" id="onsubmit"></a><a href="###" onclick="sendlogtoserver(145,2,-1,89476)"><img src="../Public/images/formcacle.gif" style="margin-left:15px;"></a></div>
				  </form>
	      </div>
        </div>
		   <div class="clear"></div>	
	  </div> 
	   <div id="g_namediv" style="display:none;">
				<div class="down_cont1">
		     
				<div class="titlogo">
        	<span class="right img"><a href="javascript:void(0)" title="关闭" style="line-height:14px;font-size:12px; color:#333;" onclick="BOX_remove('g_namediv')" target="_self"><img src="../Public/images/down_close.gif"></a></span>
        	<h2 class="left">创建订单</h2>
        </div>
				 <form action="?mo=order&amp;fo=order_add&amp;ro=s&amp;sid=61037&amp;pid=89476" method="post">
                <div class="cj_con">
				      <div class="jb_info">基本信息</div>
			          <table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tbody><tr>
                            <td height="35" align="right" width="10%">订单名称：</td>
                            <td align="center" width="2%"><div class="star">*</div></td>
                            <td><input name="order_name" size="35" class="input_cj left" id="order_name" type="text">                              
							<div id="checkorder_name" class="tips_error left" style="width:;display:none"></div></td>
                         </tr>
                           <tr>
                           <td height="35" align="right">外部编号：</td>
                           <td align="center">&nbsp;</td>
                           <td><input name="order_code" id="order_code" size="35" class="input_cj left" type="text">
                           <div class="statistic">
					             <div class="contextual_help" style="right:415px; top:6px;">
								 <a href="#" onmouseout="closeHelp(9);" onmouseover="showHelp(9);"> </a>
								 <div id="key9" style="display: none;"> 
								     <p>外部编号：一般填写网站与广告客户之间签署的合同号。</p>
								 </div>
								 </div>
					         </div>	<div id="checkorder_code" class="tips_error left" style="display:none;margin-left:45px"></div></td>
                         </tr>
                         <tr>
                           <td height="35" align="right">开始日期：</td>
                           <td align="center"></td>
                           <td><input name="order_starttime" size="25" class="input_cj left" id="order_starttime" readonly="readonly" type="text"><div id="checkordertime" class="tips_error left" style="width:135px;display:none"></div><div id="ordercalendarT" style="position:absolute;display:none;z-index:977;padding-top:0px;top:179px; _top:233px; *+top:173px; left:335px; *left:-283px; _left:413px;"></div></td>
                         </tr>
                         <tr>
                           <td height="35" align="right">结束日期：</td>
                           <td align="center"></td>
                           <td class="blue" id="orderendtimenolimit">不限　<a href="javascript:" id="orderendtimenolimitchange">更改</a><div class="statistic">
					             <div class="contextual_help" style="right:565px;">
								 <a href="#" onmouseout="closeHelp(12);" onmouseover="showHelp(12);"> </a>
								 <div id="key12" style="display: none;"> 
								     <p>结束日期：结束日期不影响广告投放，仅用于用户标记订单信息。</p>
								 </div>
								 </div>
					         </div></td>
							  <td class="blue" style="display:none" id="orderendtimelimit"><input name="order_endtime" size="25" class="input_cj left" id="order_endtime" readonly="readonly" type="text"><div id="ordercalendarTend" style="position:absolute;display:none;z-index:999;padding-top:0px;top:209px; _top:203px; *+top:203px; left:335px; *left:-283px; _left:413px;"></div><a href="javascript:" id="orderendtimelimitlimt">不限</a><div class="statistic">
					             <div class="contextual_help" style="right:445px;">
								 <a href="#" onmouseout="closeHelp(15);" onmouseover="showHelp(15);"> </a>
								 <div id="key15" style="display: none;"> 
								     <p>结束日期：结束日期不影响广告投放，仅用于用户标记订单信息。</p>
								 </div>
								 </div>
					         </div></td>
                         </tr>
                          <tr>
                            <td height="35" align="right" valign="top">备注：</td>
                            <td align="center"></td>
                            <td><textarea name="order_descripe" id="order_descripe" class="input_cj" style="width:330px; height:70px;"></textarea></td>
                         </tr>
						  <tr>
                            <td height="35" align="right" valign="top"></td>
                            <td align="center"></td>
                            <td><div id="check_order_descripe" class="tips_error left" style="display:none"></div></td>
                         </tr>
						
                      </tbody></table>
					   <div style="">
					   <div class="jb_info">广告客户</div>
			          <table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tbody><tr>
                            <td height="35" align="right" width="10%">广告主：</td>
                            <td align="center" width="2%"><div class="star">*</div></td>
                            <td><span class="left"><div style="position:absolute; z-index:877;">
						            <div class="xl_tit" style="top:-7px;">
									    <span class="left" id="selectcompanygridTable">默认公司</span>
										<span><a href="javascript:" onclick="showcompany()"></a></span>
									</div>
									 <div class="xlmenu_top" id="companygridTablehead" style="width:575px;margin-top:-5px;display:none;position:absolute;z-index:877;">
										          <span class="ff">公司</span>	
						<span class="right"><input name="company_search_cd" id="company_search_cd" class="ss_inp" value="输入广告主名称关键字" style="width:170px;margin-top:-14px" type="text">
		           <img src="../Public/images/search.gif" name="Submit" value="提交" onclick="getcompanyload()" style="cursor:pointer;margin-top:5px"></span>

				   </div>
									<div class="xl_con" style="width:590px; top:25px; display:none;" id="companygridTablebody">
									   <table id="companygridTable" style="  background-color:#fff;"></table>
									<div id="companygridPager"></div>
									</div>
						      </div>　
                                <div style="position:absolute; z-index:777;">
						            <div class="xl_tit" style="top:-22px; _top:-7px; *+top:-7px; left:160px; _left:140px; *+left:140px;">
									    <span class="left" id="selectlinkmangridTable">选择联系人</span>
										<span><a href="javascript:" onclick="showlinkman()"></a></span>
									</div>
									<div class="xl_con" style=" width: 575px;left:160px; _left:140px; *+left:140px; top:-22px; _top:-8px; *+top:-8px; display:none;" id="linkmangridTablediv">
									<div class="xlmenu_top" id="linkmangridTablehead" style="width: 575px; display:;">
										          <span class="ff" style="margin-top:1px">联系人</span>
												  <span class="right" style="margin-top:4px"><input name="linkman_search_cd" class="ss_inp" value="输入联系人名称关键字" id="linkman_search_cd" style="width:170px;margin-top: -14px;" type="text">
		            <img src="../Public/images/search.gif" name="Submit" value="提交" onclick="getlinkmanload()" style="cursor:pointer;"></span>											  </div>
									<div class="" id="linkmangridTablebody" style="width:575px;position:absolute;">
										   <table id="linkmangridTable" style="  background-color:#fff;"></table>
											<div id="linkmangridPager"></div>
									</div>
									</div>
						      </div>　
                            </span>
                              <div class="statistic">
					             <div class="contextual_help" style="right:330px; top:0px;display:none">
								 <a href="#" onmouseout="closeHelp(2);" onmouseover="showHelp(2);"> </a>
								 <div id="key2" style="display: none;"> 
								      <p>广告位状态有哪些？</p>
									  <p>使用中：广告位下有正在使用的广告。</p>
									  <p>已排期：广告位下广告未到投放日期，准备投放。</p>
									  <p>空闲：广告位下没有准备投放和正在投放的广告。</p>
								 </div>
								 </div>
				           </div></td><td><div id="checkcompany" class="tips_error left" style="width:135px;display:none "></div></td>
                         </tr>
                         <tr>
                           <td height="35" align="right">代理商：</td>
                           <td align="center">&nbsp;</td>
                           <td>
						     <span class="left">
						         <div style="position:absolute;z-index:777;">
						            <div class="xl_tit" style="top:-7px;">
									    <span class="left" id="selectdailigridTable">默认公司</span>
										<span><a href="javascript:" onclick="showdaili()"></a></span>
									</div>
									<div class="xlmenu_top" id="dailigridTablehead" style="margin-top:-5px;display:none;width:575px;">
										          <span class="ff">公司</span>
												  <span class="right"><input name="daili_search_cd" class="ss_inp" value="输入代理商名称关键字" id="daili_search_cd" style="width:170px;margin-top:-14px" type="text">
		          <img src="../Public/images/search.gif" name="Submit" value="提交" onclick="getdailiload()" style="cursor:pointer;"></span>										      </div>
									<div class="xl_con" id="dailigridTablebody" style="width:590px; top:-1px; display:none;">
									   <table id="dailigridTable" style="  background-color:#fff;"></table>
											<div id="dailigridPager"></div>
									</div>
						      </div>　
							  
                                  <div style="position:absolute; z-index:600;">
						            <div class="xl_tit" style="top:-22px; _top:-7px; *+top:-7px; left:160px; _left:140px; *+left:140px;">
									    <span class="left" id="selectdaililinkgridTable">选择联系人</span>
										<span><a href="javascript:" onclick="showdaililink()"></a></span>
									</div>
									<div class="xl_con" style="width:590px; left:160px; _left:140px; *+left:140px; top:-22px; _top:-8px; *+top:-8px; display:none;" id="daililinkgridTablediv">
									 <div class="xlmenu_top" id="daililinkgridTablehead" style="width: 575px; ">
										          <span class="ff" style="margin-top:1px">联系人</span>
												  <span class="right" style="margin-top:4px"><input name="daililinkman_search_cd" id="daililinkman_search_cd" class="ss_inp" value="输入联系人名称关键字" style="width:170px;margin-top:-14px" type="text">
		           <img src="../Public/images/search.gif" name="Submit" value="提交" onclick="getdaililinkmanload()" style="cursor:pointer;"></span>			 </div>
									<div class="" id="daililinkgridTablebody" style="width:575px;position:absolute; ">
									   <table id="daililinkgridTable" style="  background-color:#fff;"></table>
											<div id="daililinkgridPager"></div>
									</div>
									</div>
						      </div>　
                             </span>
                             <div class="statistic">
                                 <div class="contextual_help" style="right:330px; top:0px;display:none">
                                   <a href="#" onmouseout="closeHelp(3);" onmouseover="showHelp(3);"> </a>
                                   <div id="key3" style="display: none;"> 
                                     <p>广告位状态有哪些？</p>
									    <p>使用中：广告位下有正在使用的广告。</p>
									    <p>已排期：广告位下广告未到投放日期，准备投放。</p>
									    <p>空闲：广告位下没有准备投放和正在投放的广告。</p>
								   </div>
						     </div>
			               </div></td></tr>
                         <tr>
                           <td height="35" align="right">&nbsp;</td>
                           <td align="center"></td>
                           <td class="blue"><input name="order_checkbox" value="1" id="order_checkbox" checked="checked" type="checkbox">
                           允许广告客户查看该订单报告</td>
                         </tr>
                      </tbody></table>
					  <div class="jb_info">销售人员</div>
			          <table border="0" cellpadding="0" cellspacing="0" width="100%">
                         <tbody><tr>
                            <td style="" height="35" align="right" width="10%">销售人员：</td>
                            <td align="center" width="2%">&nbsp;</td>
                            <td width="88%"><span class="left">
                              <div style="position:absolute; z-index:688;">
						            <div class="xl_tit" style="top:-7px;">
									    <span class="left" id="selectsalemangridTable">选择销售人员</span>
										<span><a href="javascript:" onclick="showsaleman()"></a></span>
									</div>
									<div class="xlmenu_top" style="margin-top:-8px;display:none;width:575px;" id="salemangridTablehead">
										          <span class="ff">销售人员</span>
												  <span class="right"><input name="saleman_search_cd" id="saleman_search_cd" class="ss_inp" style="width:170px;margin-top:-14px" type="text">
		           <img src="../Public/images/search.gif" name="Submit" value="提交" onclick="getsalemanload()" style="cursor:pointer;"></span>											  </div>
									<div class="xl_con" style="margin-top:14px; display:none;width:575px;" id="salemangridTablebody">
									
									 <table id="salemangridTable" style="  background-color:#fff;"></table>
									<div id="salemangridPager"></div>
									  
									</div>
						      </div>　
                            </span></td>
                         </tr>
                      </tbody></table>
					  </div>
					  <div style=" margin-top:20px;" align="center"><a href="javascript:"><img type="image" src="../Public/images/over.gif" onclick="orderisValidate()"></a></div>
		        </div>
				
				</form>
        </div>
			 </div>
	  <div id="BOX_overlay"></div>
<script>


$(document).ready(function(){$("input[name='radio1']").change(function(){var type1=$("input[name='radio1']:checked").val();if(type1==0){$('#type1'+type1).show();$('#phone_address').hide();$('#phone_upload').show();}
if(type1==1){$('#type1'+type1).hide();$('#phone_address').show();$('#phone_upload').hide();}});$("input[name='radio2']").change(function(){var type=$("input[name='radio2']:checked").val();if(type==0){$('#flash_address').hide();$('#flash_upload').show();}
if(type==1){$('#flash_address').show();$('#flash_upload').hide();}});$("input[name='radio3']").change(function(){var type=$("input[name='radio3']:checked").val();if(type==0){$('#wait_address').hide();$('#wait_phone').show();}
if(type==1){$('#wait_address').show();$('#wait_phone').hide();}});$("input[name='checkbox']").change(function(){var type=$("input[name='checkbox']:checked").val();if(type==1){$('#wait').show();}});$("#down").click(function(){$("#show_sc").hide();$("#up").show();$("#down").hide();});$("#up").click(function(){$("#show_sc").show();$("#up").hide();$("#down").show();});$("#materialcreatename").blur(function(){var materialcreatename=$("#materialcreatename").val();var txt_len=$.trim(materialcreatename).length;$.ajax({type:'POST',url:'?mo=material&fo=material_checkname&ro=s&sid=61037&pid=89476',data:'materialcreatename='+$("#materialcreatename").val(),success:function(msg){if(msg!=0){if(msg.indexOf('guanli_session_timeout_list')!=-1){window.location.href='?mo=login&fo=login_timeout';}else{return false;}}else{$("#nomaterialname").hide();}}});});   
   $('#ex3aTrigger').click(function() {

		var s="";
		if($('#intotype5').val()==1)
			{
				 s="&intotype5=yes";
			}
		var dname=$('#delivery_name').val().replace("&","(a)");
		
	if($('#submitslotname').val())
			{
				var slotsize=$('#submitslotname').val();
			}
		else
			{
				var slotsize="";
			}
	var slot_source_material_id = $('#slot_source_material_id').val();
	var slotcodeinwhere = $('#slotcodeinwhere').val();
		$('#creatematerialiftame').html("<iframe id='ceratematerialmain' src='?mo=material&fo=material_create&ro=s&sid=61037&pid=89476&formdelivery=yes&slotcodeinwhere="+slotcodeinwhere+"&slot_source_material_id="+slot_source_material_id+"&slotsize="+slotsize+"&dname="+dname+""+s+"&"+Math.random()+"' frameborder='0' scrolling='no' width=800 ></iframe>");
		$('#intotype5').val(0);
		$("#ceratematerialmain").load(function(){
		var mainheight = $(this).contents().find("body").height()-59;
		$(this).height(mainheight);
		$('#ex3a').height(mainheight);
		}); 
$('.inner').css("position",'');
		
    });
    $('#ex3aTriggercode').click(function() {
		$('#intotype5').val(1);
        $('#ex3aTrigger').click();
    });
	
	
	});function deletename(id){var del_material=confirm('确认删除这个物料？');if(del_material){var num=$("#list  tr").length-1;var select2=$('#select2').val();if(num==3&&select2==1){$('#num_0').hide();$('.tr_xl_tit').children(":eq(3)").hide();$('.tr_white_tit').each(function(){$(this).children(":eq(3)").hide();});$('#select2').val('0');$('#material_change').val('0');$('#str1').val('');}
if(num==3){gridReload1(0);$('#select2').val('0');}
if(num<12){$("#relation").hide();}
if(num==2){$('#num_0').show();$('#d_m_num').hide();}
if(num>2){$('#lunhuan').show();}
if(num<4){$('#lunhuan').show();$('#flash_code_num').hide();$('#show_falsh').hide();$('#time_a').hide();$('#material_change').val('0');}
var id1=id+',';var m_id=$("#material_id").val();var zhi=m_id.replace(id1,'');$('#select'+id).remove();$('#weight'+id).remove();$("#material_id").val(zhi);var material_change=$("#select2").val();if(material_change==2){if($('#list .flash_i').size()!='0'||$('#list .code_i').size()!='0'){$('#flash_code_num').show();}else{$('#flash_code_num').hide();}}setmolist();}else{return false;}}
function mat_upload(){var upload=$('#linktrue4').val();var tem_upload=$('#linkname4').val();$.ajax({type:'POST',url:'?mo=material&fo=material_upload',dataType:'json',data:'upload='+upload+'&tem_upload='+tem_upload+'&date='+new Date(),success:function(data)
{if(data!=''){$('#file_code').show();}}});}
function mat_upload_modify(){var upload=$('#linktrue42').val();var tem_upload=$('#linkname43').val();$.ajax({type:'POST',url:'?mo=material&fo=material_upload',dataType:'json',data:'upload='+upload+'&tem_upload='+tem_upload+'&date='+new Date(),success:function(data)
{if(data!=''){$('#file_code').show();}}});}
</script>
<div id="ex3a" class="jqmDialog jqmID2" style="display:none;width:800px;">
	<div class="jqmdTL">
		<h2 class="left">创建物料</h2>
	</div>
	<input class="jqmdX jqmClose" onfocus="this.blur()" src="../Public/images/down_close.gif" type="image">
	<div class="jqmdBL" id="creatematerialiftame"></div>
</div>
		


	<div id="ex3a_modify" class="jqmDialog jqmID1">
    	<div class="jqmdTL">
        	<h2 class="left">修改物料</h2>
        </div>
		 <input class="jqmdX jqmClose" onfocus="this.blur()" src="../Public/images/down_close.gif" type="image">
		 <div class="jqmdBL" id="modifymaterialiftame"></div>
		 
	</div>
		</div>
		<div id="slot_url_show" style="display:none;background-color: #FFFFFF;border: 1px solid #A2CEE9;left: 50%;margin-left: -200px;position: absolute; top: 440px;width:400px;">
		<div class="jqmdTL"> &nbsp;&nbsp;<strong>请输入广告位所在网页URL</strong>
		  <input src="../Public/images/down_close.gif" class="jqmdX jqmClose" onclick="BOX_remove('slot_url_show')" type="image"> 
		</div>
		    <div style="height: 45px;   padding: 10px;">
			   URL地址：<input id="slot_url" value="http://" style="width: 195px;" class="input_cj">	
			   <div id="slot_url_error" class="tips_error right" style="display: none;"></div>
			   <div style="clear:both; height:10px;"></div>
			    <font color="#a6acae"> 注：1. 请确保页面已部署广告位代码，才能得到真实预览。<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. URL保存后，如需修改请在【广告位】【修改广告位】中重置。</font>
			   </div>
			   <div style="padding: 5px;" align="center"></div>
			<div style="  padding: 10px;" align="center">
       	       <label>
				<a href="javascript:"><img onclick="slot_url_add();" src="../Public/images/over.gif" id="onsubmit1"></a>
			  </label>
			  <label>
			   <img src="../Public/images/formcacle.gif" style="margin-left:15px;" onclick="BOX_remove('slot_url_show')">
			  </label>
		   </div>
		 </div>
		 <input id="visual_preview_id" type="hidden">
		 <input id="intotype5" value="0" type="hidden">
		<div id="BOX_overlay"></div>
		<div class="clear"></div>
		<script>
		setmolist();
		</script>
	 

<!--  帮助小提示  -->
<input value="am1.adm.cnzz.net" type="hidden">
<input value="89476" id="uidlog" type="hidden">
<input value="ro=s&amp;sid=61037&amp;pid=89476" id="new_role_sid" type="hidden">
<input value="79023d0e8772c1a7cd9b7926d5133bed" id="slot_adm_cnzz_token" type="hidden">
<!--可视化-->
<div id="showviewtips" class="slot_pop_box" style="display:none;">

<div class="ad_window" style="display:none">

<div class="ad_close"></div><div class="ad_btn"><img src="../Public/images/tiyan_no.png" title="立即体验" height="44" width="204"></div>
<div class="ad_notice" style="">温馨提醒：系统检测到您还没有广告位流量，请先部署广告位，再来体验吧。 <a href="#" style="text-decoration:underline ">立即部署广告位</a></div>
</div>
<div class="ad_window_1">

<div class="ad_close"></div><div class="ad_btn"><a href="javascript:" onclick="getshowviewstatus()"><img src="../Public/images/tiyan.png" title="立即体验" height="44" width="204"></a></div>
</div>

<input id="showviewgotourl" value="" type="hidden">
<input id="isshowviewtips" value="" type="hidden">

</div>

<script>
function showHelp(obj){
var help = document.getElementById("key"+obj).style.display;
document.getElementById("key"+obj).style.display="";

} 

function closeHelp(obj){
var help = document.getElementById("key"+obj).style.display;
document.getElementById("key"+obj).style.display="none";
}
			if('0'=='0')
				{
					if(1==0)
				{
						$.ajax({
						type:'GET',
						url:'?mo=manager&fo=warning&ro=s&sid=61037&pid=89476',
						data:'date='+new Date(),
						success:function(msg)
						{
							if(msg==-1)
							{
								$('#web_site').remove();
							}
							else
							{
							if(msg==0)	
								{
									$('#warningnum').attr('color','green');
									$('#warningnum').html(0);
								}
							if(msg>0)
								{
								
									$('#warningnum').html("<a href='?mo=slot&fo=slot_paiqi&warn=yes&ro=s&sid=61037&pid=89476' style='color:red;'>"+msg+"</a>");
									
								}
							}				
						}
						});
								
					}
					}
	</script>

</body></html>